25 lines
313 B
Go
25 lines
313 B
Go
package routes
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
var e *gin.Engine
|
|
|
|
// NewEngine -
|
|
func NewEngine() *gin.Engine {
|
|
e = gin.New()
|
|
e.Use(gin.Logger())
|
|
e.Use(gin.Recovery())
|
|
return e
|
|
}
|
|
|
|
// SetRoutes -
|
|
func SetRoutes() {
|
|
e.GET("/", func(c *gin.Context) {
|
|
c.String(http.StatusOK, "OK")
|
|
})
|
|
}
|