mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
优化工程结构
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user