优化工程结构

This commit is contained in:
boyce
2020-10-30 16:32:37 +08:00
parent 3025eaebd5
commit d2f52b382d
33 changed files with 1087 additions and 1210 deletions

View File

@@ -15,7 +15,6 @@ func Init(chanCloseSig chan bool) {
}
}
func Setup(s IService) bool {
_,ok := mapServiceName[s.GetName()]
if ok == true {
@@ -26,8 +25,8 @@ func Setup(s IService) bool {
return true
}
func GetService(servicename string) IService {
s,ok := mapServiceName[servicename]
func GetService(serviceName string) IService {
s,ok := mapServiceName[serviceName]
if ok == false {
return nil
}
@@ -35,7 +34,6 @@ func GetService(servicename string) IService {
return s
}
func Start(){
for _,s := range mapServiceName {
s.Start()
@@ -47,4 +45,3 @@ func WaitStop(){
s.Wait()
}
}