Skip to content

Commit 0d45e38

Browse files
committed
remove gin logger
1 parent fbba2be commit 0d45e38

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ package main
22

33
import (
44
"bufio"
5-
"github.com/gin-gonic/gin"
65
"os"
76
"strconv"
87
"time"
98

109
"github.com/ProtobufBot/Go-Mirai-Client/service/bot"
1110
"github.com/ProtobufBot/Go-Mirai-Client/service/handler"
11+
"github.com/gin-gonic/gin"
1212
log "github.com/sirupsen/logrus"
1313
)
1414

@@ -56,7 +56,10 @@ func main() {
5656

5757
log.Infof("端口号 %s", port)
5858
port = ":" + port
59-
router := gin.Default()
59+
//router := gin.Default()
60+
router := gin.New()
61+
router.Use(gin.Recovery())
62+
6063
router.Use(handler.CORSMiddleware())
6164
router.Static("/", "./static")
6265
router.POST("/bot/create/v1", handler.CreateBot)

0 commit comments

Comments
 (0)