mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-20 17:57:54 +00:00
修改拼写错误,删除注释代码
This commit is contained in:
@@ -37,6 +37,4 @@ $(function(){
|
||||
func HelloWorld(c *gin.Context){
|
||||
c.Header("Content-Type", "text/html; charset=utf-8")
|
||||
c.String(200, INDEX)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
@@ -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
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user