优化日志,避免一些变量的逃逸

This commit is contained in:
boyce
2021-07-01 16:27:48 +08:00
parent 7392d90ef2
commit d9333e31c0
22 changed files with 157 additions and 141 deletions

View File

@@ -55,7 +55,7 @@ func (cls *Cluster) readServiceConfig(filepath string) (map[string]interface{},
serviceCfg :=v.(map[string]interface{})
nodeId,ok := serviceCfg["NodeId"]
if ok == false {
log.Fatal("NodeService list not find nodeId field: %+v",nodeServiceList)
log.SFatal("NodeService list not find nodeId field")
}
mapNodeService[int(nodeId.(float64))] = serviceCfg
}