23 lines
273 B
Go
23 lines
273 B
Go
|
package routes
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
func New() *gin.Engine {
|
||
|
e := gin.New()
|
||
|
|
||
|
e.Use(gin.Logger())
|
||
|
e.Use(gin.Recovery())
|
||
|
|
||
|
return e
|
||
|
}
|
||
|
|
||
|
func SetRoute(e *gin.Engine) {
|
||
|
e.GET("/", func(c *gin.Context) {
|
||
|
c.String(http.StatusOK, "ok")
|
||
|
})
|
||
|
}
|