From 54f54acfc3e71534ae560abb79449b17212d1dac Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 21 Jul 2021 10:36:49 +0800 Subject: [PATCH] Move convert into internal --- Makefile | 2 +- convert.go | 2 +- integrations/types_test.go | 2 +- {convert => internal/convert}/bool.go | 0 {convert => internal/convert}/conversion.go | 0 {convert => internal/convert}/float.go | 0 {convert => internal/convert}/int.go | 0 {convert => internal/convert}/interface.go | 0 {convert => internal/convert}/scanner.go | 0 {convert => internal/convert}/string.go | 0 {convert => internal/convert}/time.go | 0 {convert => internal/convert}/time_test.go | 0 internal/statements/statement.go | 2 +- internal/statements/update.go | 2 +- internal/statements/values.go | 2 +- scan.go | 2 +- session.go | 2 +- session_get.go | 2 +- tags/parser.go | 2 +- 19 files changed, 10 insertions(+), 10 deletions(-) rename {convert => internal/convert}/bool.go (100%) rename {convert => internal/convert}/conversion.go (100%) rename {convert => internal/convert}/float.go (100%) rename {convert => internal/convert}/int.go (100%) rename {convert => internal/convert}/interface.go (100%) rename {convert => internal/convert}/scanner.go (100%) rename {convert => internal/convert}/string.go (100%) rename {convert => internal/convert}/time.go (100%) rename {convert => internal/convert}/time_test.go (100%) diff --git a/Makefile b/Makefile index 1bdd44c9..5675589d 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ GOFMT ?= gofmt -s TAGS ?= SED_INPLACE := sed -i -GO_DIRS := caches contexts integrations convert core dialects internal log migrate names schemas tags +GO_DIRS := caches contexts integrations core dialects internal log migrate names schemas tags GOFILES := $(wildcard *.go) GOFILES += $(shell find $(GO_DIRS) -name "*.go" -type f) INTEGRATION_PACKAGES := xorm.io/xorm/integrations diff --git a/convert.go b/convert.go index 9a7cbd0d..c4fc7867 100644 --- a/convert.go +++ b/convert.go @@ -15,7 +15,7 @@ import ( "strconv" "time" - "xorm.io/xorm/convert" + "xorm.io/xorm/internal/convert" ) var errNilPtr = errors.New("destination pointer is nil") // embedded in descriptive error diff --git a/integrations/types_test.go b/integrations/types_test.go index f192c1ff..9d4e46a0 100644 --- a/integrations/types_test.go +++ b/integrations/types_test.go @@ -13,7 +13,7 @@ import ( "testing" "xorm.io/xorm" - "xorm.io/xorm/convert" + "xorm.io/xorm/internal/convert" "xorm.io/xorm/internal/json" "xorm.io/xorm/schemas" diff --git a/convert/bool.go b/internal/convert/bool.go similarity index 100% rename from convert/bool.go rename to internal/convert/bool.go diff --git a/convert/conversion.go b/internal/convert/conversion.go similarity index 100% rename from convert/conversion.go rename to internal/convert/conversion.go diff --git a/convert/float.go b/internal/convert/float.go similarity index 100% rename from convert/float.go rename to internal/convert/float.go diff --git a/convert/int.go b/internal/convert/int.go similarity index 100% rename from convert/int.go rename to internal/convert/int.go diff --git a/convert/interface.go b/internal/convert/interface.go similarity index 100% rename from convert/interface.go rename to internal/convert/interface.go diff --git a/convert/scanner.go b/internal/convert/scanner.go similarity index 100% rename from convert/scanner.go rename to internal/convert/scanner.go diff --git a/convert/string.go b/internal/convert/string.go similarity index 100% rename from convert/string.go rename to internal/convert/string.go diff --git a/convert/time.go b/internal/convert/time.go similarity index 100% rename from convert/time.go rename to internal/convert/time.go diff --git a/convert/time_test.go b/internal/convert/time_test.go similarity index 100% rename from convert/time_test.go rename to internal/convert/time_test.go diff --git a/internal/statements/statement.go b/internal/statements/statement.go index 0e245a96..8e3c083c 100644 --- a/internal/statements/statement.go +++ b/internal/statements/statement.go @@ -15,8 +15,8 @@ import ( "xorm.io/builder" "xorm.io/xorm/contexts" - "xorm.io/xorm/convert" "xorm.io/xorm/dialects" + "xorm.io/xorm/internal/convert" "xorm.io/xorm/internal/json" "xorm.io/xorm/internal/utils" "xorm.io/xorm/schemas" diff --git a/internal/statements/update.go b/internal/statements/update.go index 3020595b..be6ed885 100644 --- a/internal/statements/update.go +++ b/internal/statements/update.go @@ -11,8 +11,8 @@ import ( "reflect" "time" - "xorm.io/xorm/convert" "xorm.io/xorm/dialects" + "xorm.io/xorm/internal/convert" "xorm.io/xorm/internal/json" "xorm.io/xorm/internal/utils" "xorm.io/xorm/schemas" diff --git a/internal/statements/values.go b/internal/statements/values.go index c572ead5..ada01755 100644 --- a/internal/statements/values.go +++ b/internal/statements/values.go @@ -12,8 +12,8 @@ import ( "reflect" "time" - "xorm.io/xorm/convert" "xorm.io/xorm/dialects" + "xorm.io/xorm/internal/convert" "xorm.io/xorm/internal/json" "xorm.io/xorm/schemas" ) diff --git a/scan.go b/scan.go index 753a510f..83ad0b02 100644 --- a/scan.go +++ b/scan.go @@ -11,9 +11,9 @@ import ( "reflect" "time" - "xorm.io/xorm/convert" "xorm.io/xorm/core" "xorm.io/xorm/dialects" + "xorm.io/xorm/internal/convert" "xorm.io/xorm/schemas" ) diff --git a/session.go b/session.go index 99f66273..a15f5c3c 100644 --- a/session.go +++ b/session.go @@ -18,8 +18,8 @@ import ( "strings" "xorm.io/xorm/contexts" - "xorm.io/xorm/convert" "xorm.io/xorm/core" + "xorm.io/xorm/internal/convert" "xorm.io/xorm/internal/json" "xorm.io/xorm/internal/statements" "xorm.io/xorm/log" diff --git a/session_get.go b/session_get.go index 08172524..617ca169 100644 --- a/session_get.go +++ b/session_get.go @@ -15,8 +15,8 @@ import ( "time" "xorm.io/xorm/caches" - "xorm.io/xorm/convert" "xorm.io/xorm/core" + "xorm.io/xorm/internal/convert" "xorm.io/xorm/internal/utils" "xorm.io/xorm/schemas" ) diff --git a/tags/parser.go b/tags/parser.go index 9f9a8f62..7d8c3bd6 100644 --- a/tags/parser.go +++ b/tags/parser.go @@ -14,8 +14,8 @@ import ( "unicode" "xorm.io/xorm/caches" - "xorm.io/xorm/convert" "xorm.io/xorm/dialects" + "xorm.io/xorm/internal/convert" "xorm.io/xorm/names" "xorm.io/xorm/schemas" )