21 lines
309 B
Go
21 lines
309 B
Go
|
package routes
|
||
|
|
||
|
import (
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
// NewServ - get new service
|
||
|
func NewServ() *gin.Engine {
|
||
|
r := gin.Default()
|
||
|
return r
|
||
|
}
|
||
|
|
||
|
// SetDefaultRoutes - set default
|
||
|
func SetDefaultRoutes(r *gin.Engine) {
|
||
|
r.GET("/", func(c *gin.Context) {
|
||
|
c.JSON(200, gin.H{
|
||
|
"message": "test",
|
||
|
})
|
||
|
})
|
||
|
}
|