sk_gm_server/boot/boot.go

26 lines
444 B
Go
Raw Normal View History

2023-03-20 13:38:28 +08:00
package boot
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/os/glog"
)
// 用于配置初始化.
func init() {
glog.Info("########service start...")
v := g.View()
c := g.Config()
s := g.Server()
// 配置对象及视图对象配置
c.AddPath("config")
v.AddPath("template")
glog.SetStdoutPrint(true)
s.SetNameToUriType(ghttp.URI_TYPE_ALLLOWER)
glog.Info("########service finish.")
}