diff --git a/errs/error_code.go b/errs/error_code.go index d5e9eea..2bbb313 100644 --- a/errs/error_code.go +++ b/errs/error_code.go @@ -1,10 +1,11 @@ package errs import ( - "code.30cm.net/digimon/library-go/errs/code" "fmt" - "github.com/zeromicro/go-zero/core/logx" "strings" + + "code.30cm.net/digimon/library-go/errs/code" + "github.com/zeromicro/go-zero/core/logx" ) type ErrorCode uint32 diff --git a/go.work b/go.work index e6ab84c..e0798e1 100644 --- a/go.work +++ b/go.work @@ -4,7 +4,7 @@ use ( . ./errs ./jwt - ./storage/mongo + ./mongo ./utils/bitmap ./utils/invited_code ./validator diff --git a/storage/mongo/config.go b/mongo/config.go similarity index 100% rename from storage/mongo/config.go rename to mongo/config.go diff --git a/storage/mongo/const.go b/mongo/const.go similarity index 100% rename from storage/mongo/const.go rename to mongo/const.go diff --git a/storage/mongo/custom_mongo_decimal.go b/mongo/custom_mongo_decimal.go similarity index 100% rename from storage/mongo/custom_mongo_decimal.go rename to mongo/custom_mongo_decimal.go diff --git a/storage/mongo/doc-db-with-cache.go b/mongo/doc-db-with-cache.go similarity index 99% rename from storage/mongo/doc-db-with-cache.go rename to mongo/doc-db-with-cache.go index f993558..1484aa2 100755 --- a/storage/mongo/doc-db-with-cache.go +++ b/mongo/doc-db-with-cache.go @@ -3,6 +3,7 @@ package mongo import ( "context" "fmt" + "github.com/zeromicro/go-zero/core/stores/cache" "github.com/zeromicro/go-zero/core/stores/mon" "go.mongodb.org/mongo-driver/mongo" diff --git a/storage/mongo/doc-db.go b/mongo/doc-db.go similarity index 99% rename from storage/mongo/doc-db.go rename to mongo/doc-db.go index ea71246..ea6d034 100755 --- a/storage/mongo/doc-db.go +++ b/mongo/doc-db.go @@ -4,15 +4,16 @@ import ( "context" "errors" "fmt" + "net/url" + "strings" + "time" + "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/core/stores/mon" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readpref" - "net/url" - "strings" - "time" ) type DocumentDB struct { diff --git a/storage/mongo/go.mod b/mongo/go.mod similarity index 100% rename from storage/mongo/go.mod rename to mongo/go.mod diff --git a/storage/mongo/option.go b/mongo/option.go similarity index 100% rename from storage/mongo/option.go rename to mongo/option.go diff --git a/storage/mongo/usecase.go b/mongo/usecase.go similarity index 99% rename from storage/mongo/usecase.go rename to mongo/usecase.go index b1bc570..cbc9090 100644 --- a/storage/mongo/usecase.go +++ b/mongo/usecase.go @@ -2,6 +2,7 @@ package mongo import ( "context" + "github.com/zeromicro/go-zero/core/stores/mon" "go.mongodb.org/mongo-driver/mongo" mopt "go.mongodb.org/mongo-driver/mongo/options"