feat:service mod
This commit is contained in:
11
conf/new.go
11
conf/new.go
@@ -59,11 +59,11 @@ func NotNil(values ...string) {
|
||||
}
|
||||
}
|
||||
|
||||
func PrintInfo(port int) {
|
||||
func PrintInfo(ip string, port int) {
|
||||
print.Success("[BSM - %s] Config Check Success.", vars.ServiceKey)
|
||||
print.Info("[BSM - %s] Service Name: %s", vars.ServiceKey, vars.ServiceKey)
|
||||
print.Info("[BSM - %s] Runtime Mode: %s", vars.ServiceKey, env.Runtime.Mode)
|
||||
print.Info("[BSM - %s] Listen Addr: %s:%d", vars.ServiceKey, utils.GetLocationIP(), port)
|
||||
print.Info("[BSM - %s] Listen Addr: %s:%d", vars.ServiceKey, ip, port)
|
||||
}
|
||||
|
||||
func CheckPort(port int) int {
|
||||
@@ -73,3 +73,10 @@ func CheckPort(port int) int {
|
||||
}
|
||||
return port
|
||||
}
|
||||
|
||||
func CheckIP(ip string) string {
|
||||
if ip == "" {
|
||||
return utils.GetLocationIP()
|
||||
}
|
||||
return ip
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user