Merge remote-tracking branch 'origin/errcode' into errcode

This commit is contained in:
withchao
2023-06-06 10:50:18 +08:00
3 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ import (
func NewUser(discov discoveryregistry.SvcDiscoveryRegistry) *User {
conn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImUserName)
if err != nil {
panic(err)
// panic(err)
}
log.ZInfo(context.Background(), "user rpc conn", "conn", conn)
return &User{conn: conn, discov: discov}
@@ -34,7 +34,7 @@ type User struct {
func (u *User) client(ctx context.Context) (user.UserClient, error) {
conn, err := u.discov.GetConn(ctx, config.Config.RpcRegisterName.OpenImUserName)
if err != nil {
panic(err)
return nil, err
}
return user.NewUserClient(conn), nil
}