修改拼写错误,删除注释代码

This commit is contained in:
zhangwenjian
2020-05-01 14:46:20 +08:00
parent 8faff5384f
commit 07068656a2
5 changed files with 3 additions and 19 deletions
-2
View File
@@ -37,6 +37,4 @@ $(function(){
func HelloWorld(c *gin.Context){
c.Header("Content-Type", "text/html; charset=utf-8")
c.String(200, INDEX)
}
-15
View File
@@ -15,21 +15,6 @@ var logger = logrus.New()
// 日志记录到文件
func LoggerToFile() gin.HandlerFunc {
////写入文件
//src, err := os.OpenFile(config2.LogConfig.Dir+"/", os.O_APPEND|os.O_WRONLY, os.ModeAppend)
//if err != nil {
// fmt.Println("err", err)
//}
//
////设置输出
//logger.Out = src
//
////设置日志级别
//logger.SetLevel(logrus.DebugLevel)
//
////设置日志格式
//logger.SetFormatter(&logrus.TextFormatter{})
return func(c *gin.Context) {
// 开始时间
startTime := time.Now()
+1
View File
@@ -77,6 +77,7 @@ func InitRouter() *gin.Engine {
auth := r.Group("/api/v1")
auth.Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
{
auth.GET("/deptList", system.GetDeptList)
auth.GET("/deptTree", system.GetDeptTree)
auth.GET("/dept/:deptId", system.GetDept)
+1 -1
View File
@@ -16,7 +16,7 @@ func InitLogger() {
case ModeProd:
file, err := os.OpenFile(viper.GetString("logger.dir")+"/api-"+time.Now().Format("2006-01-02")+".log", os.O_WRONLY|os.O_APPEND|os.O_CREATE|os.O_SYNC, 0600)
if err != nil {
log.Fatal("log init failed")
log.Fatalln("log init failed")
}
var info os.FileInfo
+1 -1
View File
@@ -33,7 +33,7 @@ func Assert(condition bool, msg string, code ...int) {
if len(code) > 0 {
statusCode = code[0]
}
panic("CustomErroe#" + strconv.Itoa(statusCode) + "#" + msg)
panic("CustomError#" + strconv.Itoa(statusCode) + "#" + msg)
}
}