Files
go-zero/tools/goctl/api/demo/handler/handlers.go

18 lines
218 B
Go
Raw Normal View History

2020-07-29 17:11:41 +08:00
package handler
import (
"net/http"
2020-07-31 11:14:48 +08:00
"zero/rest"
2020-07-29 17:11:41 +08:00
)
2020-07-31 11:45:16 +08:00
func RegisterHandlers(engine *rest.Server) {
2020-07-31 11:14:48 +08:00
engine.AddRoutes([]rest.Route{
2020-07-29 17:11:41 +08:00
{
Method: http.MethodGet,
Path: "/",
Handler: GreetHandler,
},
})
}