mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 10:22:36 +08:00
errcode
This commit is contained in:
parent
1b4f6054ae
commit
c1d6f5809b
@ -1,8 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
mongoUtils "Open_IM/cmdutils/mongo"
|
||||||
"Open_IM/pkg/common/config"
|
"Open_IM/pkg/common/config"
|
||||||
mongo2 "Open_IM/test/mongo"
|
|
||||||
"context"
|
"context"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -26,11 +26,11 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var err error
|
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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
err = mongo2.Client.Ping(context.TODO(), nil)
|
err = mongoUtils.Client.Ping(context.TODO(), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -41,5 +41,5 @@ func main() {
|
|||||||
userID := flag.String("userID", "", "userID")
|
userID := flag.String("userID", "", "userID")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
fmt.Println("userID:", *userID)
|
fmt.Println("userID:", *userID)
|
||||||
mongo2.GetUserAllChat(*userID)
|
mongoUtils.GetUserAllChat(*userID)
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package callback
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"Open_IM/pkg/common/constant"
|
"Open_IM/pkg/common/constant"
|
Loading…
x
Reference in New Issue
Block a user