提交 a977beef 编写于 作者: J Jason

顶替

上级 4d6bb209
......@@ -13,7 +13,7 @@ type _storage struct {
Debug bool `yaml:"debug"`
}
type _http struct {
type _web struct {
Desc string `yaml:"desc"`
Addr string `yaml:"addr"`
Debug bool `yaml:"debug"`
......@@ -22,7 +22,7 @@ type _http struct {
type _config struct {
Storage _storage `yaml:"storage"`
Http _http `yaml:"http"`
Web _web `yaml:"web"`
}
var Config = _config{
......@@ -31,7 +31,7 @@ var Config = _config{
"data",
false,
},
_http{
_web{
"HTTP服务配置",
":8080",
false,
......
......@@ -15,7 +15,7 @@ import (
)
func Serve() {
if !conf.Config.Http.Debug {
if !conf.Config.Web.Debug {
gin.SetMode(gin.ReleaseMode)
}
......@@ -45,7 +45,7 @@ func Serve() {
})
//监听HTTP
if err := app.Run(conf.Config.Http.Addr); err != nil {
if err := app.Run(conf.Config.Web.Addr); err != nil {
log.Fatal("HTTP 服务启动错误", err)
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册