标签:json span fun code class string tin import tor
routers/router.go
package routers
import (
"github.com/gin-gonic/gin"
"gin-blog/pkg/setting"
)
func InitRouter() *gin.Engine {
r := gin.New()
r.Use(gin.Logger())
r.Use(gin.Recovery())
gin.SetMode(setting.RunMode)
r.GET("/test", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "test",
})
})
return r
}
标签:json span fun code class string tin import tor
原文地址:https://www.cnblogs.com/yeyong/p/14821873.html