Skip to content

Commit

Permalink
conf,README:improvements conf and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
axfor committed Jan 9, 2020
1 parent abfc3c0 commit f35df26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ bast.Run(":9999")
"maxAge":"1728000",
"allowCredentials":"true"
},
"conf":{//user config(non bast framework)
"conf":{//user config(non bast framework) such as db config
"key":"app",
"name":"xxx",
"dbTitle":"xxx app",
Expand Down
18 changes: 3 additions & 15 deletions conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@ type AppConf struct {
initTag bool
}

//Item default db config
type Item struct {
Name string `json:"name"`
Title string `json:"dbTitle"`
User string `json:"dbUser"`
Pwd string `json:"dbPwd"`
Server string `json:"dbServer"`
Charset string `json:"dbCharset"`
ParseTime *bool `json:"dbParseTime"`
Loc string `json:"dbLoc"`
}

//CORS config
type CORS struct {
AllowOrigin string `json:"allowOrigin"`
Expand Down Expand Up @@ -180,9 +168,9 @@ func callbackHandle() {
if lg == 0 {
return
}
for i := 0; i < lg; i++ {
c := &confObj.rawConfs[i]
if confHandle != nil {
if confHandle != nil {
for i := 0; i < lg; i++ {
c := &confObj.rawConfs[i]
err := confHandle(c)
if err != nil {
logs.Errors("callback conf handle error", err)
Expand Down

0 comments on commit f35df26

Please sign in to comment.