go-ddns-svc/route/routes/routes.go
2019-05-02 11:51:48 +08:00

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")
})
}