Skip to content

Commit

Permalink
fix nil config (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaow authored and sandyskies committed May 10, 2019
1 parent 568393c commit c3b426f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tars/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ func initConfig() {
confPath := flag.String("config", "", "init config path")
flag.Parse()
if len(*confPath) == 0 {
return
TLOG.Error("app config not found")
os.Exit(1)
}
c, err := conf.NewConf(*confPath)
if err != nil {
TLOG.Error("open app config fail")
os.Exit(1)
}
//Config.go
//Server
Expand Down

0 comments on commit c3b426f

Please sign in to comment.