Commit 5378ccd7 by 孙龙

up

parent 3e333a7d
Showing with 5 additions and 6 deletions
......@@ -15,10 +15,7 @@ import (
"syscall"
"time"
)
var (
config = flag.String("config", "./conf/dev/", "input config file like ./conf/dev/")
)
var config string
func registryEtcd(){
//初始化注册中心 注册etcd 服务中心
......@@ -41,11 +38,13 @@ func registryEtcd(){
func main(){
if *config == "" {
flag.StringVar(&config, "config", "./conf/dev", "配置文件")
flag.Parse()
if config == "" {
flag.Usage()
os.Exit(1)
}
lib.InitModule(*config)
lib.InitModule(config)
defer lib.Destroy()
dao.ServiceManagerHandler.LoadOnce()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment