Commit 057d86dd by mushishixian

修整启动项

parent 4ecfdd6a
Showing with 7 additions and 9 deletions
......@@ -4,23 +4,21 @@ import (
"search_server/pkg/config"
"search_server/pkg/gredis"
"search_server/pkg/logger"
"search_server/pkg/mongo"
"search_server/pkg/mysql"
)
func Boot(configPath string) (err error) {
if err = config.SetUp(configPath); err != nil {
panic(err)
}
if err = mysql.Setup(); err != nil {
return
}
//if err = mysql.Setup(); err != nil {
// return
//}
if err = gredis.Setup(); err != nil {
return
}
if err = mongo.SetUp(); err != nil {
return
}
//if err = mongo.SetUp(); err != nil {
// return
//}
if err = logger.SetUp(); err != nil {
return
}
......
......@@ -17,7 +17,7 @@ func main() {
if err := boot.Boot(path); err != nil {
panic(err)
}
gin.SetMode(config.Get("web.mode").String())
r := gin.New()
gin_.BootStrap(r)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment