diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 378778bca8..40ef2580d3 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -22,5 +22,5 @@ blocks: - createdb -U postgres -h 0.0.0.0 dinotest - checkout - sem-version go 1.12 - - cd testdata/ondeck + - cd internal/dinosql/testdata/ondeck - go test -v ./... diff --git a/cmd/dinosql/main.go b/cmd/dinosql/main.go index 53fe791051..fff6a88ed0 100644 --- a/cmd/dinosql/main.go +++ b/cmd/dinosql/main.go @@ -4,7 +4,7 @@ import ( "flag" "log" - "github.com/kyleconroy/dinosql" + "github.com/kyleconroy/dinosql/internal/dinosql" ) func main() { diff --git a/checks.go b/internal/dinosql/checks.go similarity index 97% rename from checks.go rename to internal/dinosql/checks.go index 8398500d54..cc6948def9 100644 --- a/checks.go +++ b/internal/dinosql/checks.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/kyleconroy/dinosql/postgres" + "github.com/kyleconroy/dinosql/internal/postgres" nodes "github.com/lfittl/pg_query_go/nodes" ) diff --git a/checks_test.go b/internal/dinosql/checks_test.go similarity index 97% rename from checks_test.go rename to internal/dinosql/checks_test.go index 57a4df8c58..e68a4ae8e3 100644 --- a/checks_test.go +++ b/internal/dinosql/checks_test.go @@ -4,8 +4,9 @@ import ( "path/filepath" "testing" + "github.com/kyleconroy/dinosql/internal/postgres" + "github.com/google/go-cmp/cmp" - "github.com/kyleconroy/dinosql/postgres" ) func TestFuncs(t *testing.T) { diff --git a/examples_test.go b/internal/dinosql/examples_test.go similarity index 100% rename from examples_test.go rename to internal/dinosql/examples_test.go diff --git a/exec.go b/internal/dinosql/exec.go similarity index 100% rename from exec.go rename to internal/dinosql/exec.go diff --git a/goose.go b/internal/dinosql/goose.go similarity index 100% rename from goose.go rename to internal/dinosql/goose.go diff --git a/goose_test.go b/internal/dinosql/goose_test.go similarity index 100% rename from goose_test.go rename to internal/dinosql/goose_test.go diff --git a/parser.go b/internal/dinosql/parser.go similarity index 99% rename from parser.go rename to internal/dinosql/parser.go index 9dc1f11f21..39491cb77c 100644 --- a/parser.go +++ b/internal/dinosql/parser.go @@ -14,9 +14,10 @@ import ( "text/template" "unicode" + "github.com/kyleconroy/dinosql/internal/postgres" + "github.com/davecgh/go-spew/spew" "github.com/jinzhu/inflection" - "github.com/kyleconroy/dinosql/postgres" pg "github.com/lfittl/pg_query_go" nodes "github.com/lfittl/pg_query_go/nodes" ) diff --git a/parser_test.go b/internal/dinosql/parser_test.go similarity index 100% rename from parser_test.go rename to internal/dinosql/parser_test.go diff --git a/query_test.go b/internal/dinosql/query_test.go similarity index 99% rename from query_test.go rename to internal/dinosql/query_test.go index b64afb4b32..9b19077b4a 100644 --- a/query_test.go +++ b/internal/dinosql/query_test.go @@ -4,8 +4,9 @@ import ( "fmt" "testing" + "github.com/kyleconroy/dinosql/internal/postgres" + "github.com/google/go-cmp/cmp" - "github.com/kyleconroy/dinosql/postgres" ) const testAliasSQL = ` diff --git a/soup.go b/internal/dinosql/soup.go similarity index 100% rename from soup.go rename to internal/dinosql/soup.go diff --git a/testdata/funcs/math.sql b/internal/dinosql/testdata/funcs/math.sql similarity index 100% rename from testdata/funcs/math.sql rename to internal/dinosql/testdata/funcs/math.sql diff --git a/testdata/ondeck/db.go b/internal/dinosql/testdata/ondeck/db.go similarity index 100% rename from testdata/ondeck/db.go rename to internal/dinosql/testdata/ondeck/db.go diff --git a/testdata/ondeck/db_test.go b/internal/dinosql/testdata/ondeck/db_test.go similarity index 100% rename from testdata/ondeck/db_test.go rename to internal/dinosql/testdata/ondeck/db_test.go diff --git a/testdata/ondeck/go.mod b/internal/dinosql/testdata/ondeck/go.mod similarity index 100% rename from testdata/ondeck/go.mod rename to internal/dinosql/testdata/ondeck/go.mod diff --git a/testdata/ondeck/go.sum b/internal/dinosql/testdata/ondeck/go.sum similarity index 100% rename from testdata/ondeck/go.sum rename to internal/dinosql/testdata/ondeck/go.sum diff --git a/testdata/ondeck/prepared/prepared.go b/internal/dinosql/testdata/ondeck/prepared/prepared.go similarity index 100% rename from testdata/ondeck/prepared/prepared.go rename to internal/dinosql/testdata/ondeck/prepared/prepared.go diff --git a/testdata/ondeck/query/city.sql b/internal/dinosql/testdata/ondeck/query/city.sql similarity index 100% rename from testdata/ondeck/query/city.sql rename to internal/dinosql/testdata/ondeck/query/city.sql diff --git a/testdata/ondeck/query/venue.sql b/internal/dinosql/testdata/ondeck/query/venue.sql similarity index 100% rename from testdata/ondeck/query/venue.sql rename to internal/dinosql/testdata/ondeck/query/venue.sql diff --git a/testdata/ondeck/schema/0001_city.sql b/internal/dinosql/testdata/ondeck/schema/0001_city.sql similarity index 100% rename from testdata/ondeck/schema/0001_city.sql rename to internal/dinosql/testdata/ondeck/schema/0001_city.sql diff --git a/testdata/ondeck/schema/0002_venue.sql b/internal/dinosql/testdata/ondeck/schema/0002_venue.sql similarity index 100% rename from testdata/ondeck/schema/0002_venue.sql rename to internal/dinosql/testdata/ondeck/schema/0002_venue.sql diff --git a/testdata/ondeck/schema/0003_add_column.sql b/internal/dinosql/testdata/ondeck/schema/0003_add_column.sql similarity index 100% rename from testdata/ondeck/schema/0003_add_column.sql rename to internal/dinosql/testdata/ondeck/schema/0003_add_column.sql diff --git a/postgres/funcs.go b/internal/postgres/funcs.go similarity index 100% rename from postgres/funcs.go rename to internal/postgres/funcs.go diff --git a/postgres/schema.go b/internal/postgres/schema.go similarity index 100% rename from postgres/schema.go rename to internal/postgres/schema.go diff --git a/postgres/types.go b/internal/postgres/types.go similarity index 100% rename from postgres/types.go rename to internal/postgres/types.go