package main import ( "base-gin/conf" "base-gin/helpers" "base-gin/router" "base-gin/utils" "fmt" "github.com/fvbock/endless" "github.com/gin-gonic/gin" ) func main() { r := gin.New() //启动配置 utils.Bootstrap(r, utils.BootstrapConf{LogLevel: conf.Conf.LogLevel}) //设置日志级别 //level, err := logrus.ParseLevel(conf.Conf.LogLevel) //if err != nil { // level = logrus.DebugLevel //} //logrus.SetLevel(level) helpers.InitMysql() router.Http(r) fmt.Println("hello world") endless.ListenAndServe(":80", r) }