1
0
mirror of https://github.com/beego/bee.git synced 2025-07-05 18:20:18 +00:00

loading driver and connStr from json if there is no commandline options specified

This commit is contained in:
ZhengYang
2014-08-13 14:34:12 +08:00
parent 4775fc3e81
commit 64f3acca26
3 changed files with 27 additions and 4 deletions

10
conf.go
View File

@ -36,7 +36,11 @@ var defaultConf = `{
"others": []
},
"cmd_args": [],
"envs": []
"envs": [],
"database": {
"driver": "mysql",
"conn": "root:@tcp(127.0.0.1:3306)/test"
}
}
`
var conf struct {
@ -62,6 +66,10 @@ var conf struct {
Dirs []string
IngExt []string `json:"ignore_ext"`
}
Database struct {
Driver string
Conn string
}
}
// loadConfig loads customized configuration.