开发模式下,log打印出行号,方便错误定位
@@ -28,7 +28,11 @@ import (
func main() {
gin.SetMode(gin.DebugMode)
if config.ApplicationConfig.Env == "dev" {
log.SetFlags(log.Lshortfile | log.LstdFlags)
} else {
gin.SetMode(gin.ReleaseMode)
}
log.Println(config.DatabaseConfig.Port)
err := gorm.AutoMigrate(orm.Eloquent)
The note is not visible to the blocked user.