mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
feat: add openim auto format code
This commit is contained in:
parent
f91d8050ce
commit
4bee0a9a14
@ -133,7 +133,7 @@ func (r *RootCmd) AddPortFlag() {
|
||||
r.Command.Flags().IntP(constant.FlagPort, "p", 0, "server listen port")
|
||||
}
|
||||
|
||||
func (r *RootCmd) hubgetPortFlag(cmd *cobra.Command) (int, error) {
|
||||
func (r *RootCmd) getPortFlag(cmd *cobra.Command) (int, error) {
|
||||
port, err := cmd.Flags().GetInt(constant.FlagPort)
|
||||
if err != nil {
|
||||
// Wrapping the error with additional context
|
||||
|
||||
@ -35,9 +35,9 @@ type RpcCmd struct {
|
||||
}
|
||||
|
||||
func NewRpcCmd(name string) *RpcCmd {
|
||||
ret := &RpcCmd{NewRootCmd(name)}
|
||||
ret.SetRootCmdPt(ret)
|
||||
return ret
|
||||
ret := &RpcCmd{NewRootCmd(name)}
|
||||
ret.SetRootCmdPt(ret)
|
||||
return ret
|
||||
}
|
||||
|
||||
func (a *RpcCmd) Exec() error {
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
package discoveryregister
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
"errors"
|
||||
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/direct"
|
||||
|
||||
@ -42,6 +42,6 @@ func NewDiscoveryRegister(envType string) (discoveryregistry.SvcDiscoveryRegistr
|
||||
case "direct":
|
||||
return direct.NewConnDirect()
|
||||
default:
|
||||
return nil, errs.Wrap(erros.new("envType not correct"))
|
||||
return nil, errs.Wrap(errors.New("envType not correct"))
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user