create base structure
This commit is contained in:
20
router/router.go
Normal file
20
router/router.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package router
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
//docs "github.com/go-project-name/docs"
|
||||
|
||||
func InitRouter() *gin.Engine {
|
||||
r := gin.New()
|
||||
//docs.SwaggerInfo.BasePath = "/api/v1"
|
||||
r.Use(gin.Logger())
|
||||
r.Use(gin.Recovery())
|
||||
|
||||
apiv1 := r.Group("/api/v1")
|
||||
apiv1.Use()
|
||||
{
|
||||
r.GET("./", )
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
Reference in New Issue
Block a user