Add go mod support.

This commit is contained in:
go-jet 2020-06-27 18:48:19 +02:00
parent 6437e041ee
commit 2ada2ff69b
103 changed files with 273 additions and 229 deletions

View file

@ -1,7 +1,7 @@
package jet
import (
"github.com/go-jet/jet/internal/utils"
"github.com/go-jet/jet/v2/internal/utils"
)
// Clause interface

View file

@ -3,8 +3,8 @@ package jet
import (
"bytes"
"fmt"
"github.com/go-jet/jet/internal/3rdparty/pq"
"github.com/go-jet/jet/internal/utils"
"github.com/go-jet/jet/v2/internal/3rdparty/pq"
"github.com/go-jet/jet/v2/internal/utils"
"github.com/google/uuid"
"reflect"
"strconv"

View file

@ -3,7 +3,7 @@ package jet
import (
"context"
"database/sql"
"github.com/go-jet/jet/qrm"
"github.com/go-jet/jet/v2/qrm"
)
//Statement is common interface for all statements(SELECT, INSERT, UPDATE, DELETE, LOCK)

View file

@ -1,7 +1,7 @@
package jet
import (
"github.com/go-jet/jet/internal/utils"
"github.com/go-jet/jet/v2/internal/utils"
)
// SerializerTable interface

View file

@ -1,7 +1,7 @@
package jet
import (
"github.com/go-jet/jet/internal/utils"
"github.com/go-jet/jet/v2/internal/utils"
"reflect"
)

View file

@ -4,9 +4,9 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/go-jet/jet/internal/jet"
"github.com/go-jet/jet/internal/utils"
"github.com/go-jet/jet/qrm"
"github.com/go-jet/jet/v2/internal/jet"
"github.com/go-jet/jet/v2/internal/utils"
"github.com/go-jet/jet/v2/qrm"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"io/ioutil"
@ -40,8 +40,8 @@ func AssertExecErr(t *testing.T, stmt jet.Statement, db qrm.DB, errorStr string)
}
func getFullPath(relativePath string) string {
goPath := os.Getenv("GOPATH")
return filepath.Join(goPath, "src/github.com/go-jet/jet/tests", relativePath)
path, _ := os.Getwd()
return filepath.Join(path, "../", relativePath)
}
// PrintJson print v as json

View file

@ -1,7 +1,7 @@
package testutils
import (
"github.com/go-jet/jet/internal/utils"
"github.com/go-jet/jet/v2/internal/utils"
"strings"
"time"
)

View file

@ -3,7 +3,7 @@ package utils
import (
"database/sql"
"fmt"
"github.com/go-jet/jet/internal/3rdparty/snaker"
"github.com/go-jet/jet/v2/internal/3rdparty/snaker"
"go/format"
"os"
"path/filepath"