Browse Source

添加mysql 配置校验

pull/101/head
lixiaoshuang 4 years ago
parent
commit
6ffb6fb99c
  1. 4
      common/config.go

4
common/config.go

@ -109,10 +109,10 @@ func checkConfig() error {
if Config.Store.Port == 0 { if Config.Store.Port == 0 {
return errors.New("Db port not valid ") return errors.New("Db port not valid ")
} }
if Config.Store.User == ""{ if Config.Store.User == "" {
return errors.New("Db user not valid ") return errors.New("Db user not valid ")
} }
if Config.Store.Password == ""{ if Config.Store.Password == "" {
return errors.New("Db password not valid ") return errors.New("Db password not valid ")
} }
} }

Loading…
Cancel
Save