diff --git a/cmdutils/mongo/cmd/main.go b/cmdutils/mongo/cmd/main.go index e2c6e99b8..9644851d8 100644 --- a/cmdutils/mongo/cmd/main.go +++ b/cmdutils/mongo/cmd/main.go @@ -1,8 +1,8 @@ package main import ( + mongoUtils "Open_IM/cmdutils/mongo" "Open_IM/pkg/common/config" - mongo2 "Open_IM/test/mongo" "context" "flag" "fmt" @@ -26,11 +26,11 @@ func init() { } } var err error - mongo2.Client, err = mongo.Connect(context.TODO(), options.Client().ApplyURI(uri)) + mongoUtils.Client, err = mongo.Connect(context.TODO(), options.Client().ApplyURI(uri)) if err != nil { panic(err) } - err = mongo2.Client.Ping(context.TODO(), nil) + err = mongoUtils.Client.Ping(context.TODO(), nil) if err != nil { panic(err) } @@ -41,5 +41,5 @@ func main() { userID := flag.String("userID", "", "userID") flag.Parse() fmt.Println("userID:", *userID) - mongo2.GetUserAllChat(*userID) + mongoUtils.GetUserAllChat(*userID) } diff --git a/pkg/common/callback/callback.go b/pkg/utils/callback.go similarity index 96% rename from pkg/common/callback/callback.go rename to pkg/utils/callback.go index 3224f7853..73bc9e2ee 100644 --- a/pkg/common/callback/callback.go +++ b/pkg/utils/callback.go @@ -1,4 +1,4 @@ -package callback +package utils import ( "Open_IM/pkg/common/constant"