Error code standardization

This commit is contained in:
skiffer-git
2023-02-09 10:58:30 +08:00
parent f20e9e71b7
commit 9a7ed2d24d
9 changed files with 183 additions and 187 deletions
-13
View File
@@ -1,7 +1,6 @@
package utils
import (
"Open_IM/pkg/common/config"
"errors"
"net"
)
@@ -24,15 +23,3 @@ func GetLocalIP() (string, error) {
return "", errors.New("no ip")
}
func GetRpcIP() (string, error) {
registerIP := config.Config.RpcRegisterIP
if registerIP == "" {
ip, err := GetLocalIP()
if err != nil {
return "", err
}
registerIP = ip
}
return registerIP, nil
}