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:
10
conf.go
10
conf.go
@ -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.
|
||||
|
Reference in New Issue
Block a user