go-ddns-svc/route/routes/routes.go

25 lines
313 B
Go
Raw Normal View History

2019-05-02 03:51:48 +00:00
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")
})
}