rename ngin to rest
This commit is contained in:
@@ -3,5 +3,5 @@ package config
|
||||
import "zero/rest"
|
||||
|
||||
type Config struct {
|
||||
rest.RtConf
|
||||
rest.RestConf
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ func main() {
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
|
||||
engine := rest.MustNewEngine(c.RtConf)
|
||||
engine := rest.MustNewServer(c.RestConf)
|
||||
defer engine.Stop()
|
||||
|
||||
handler.RegisterHandlers(engine)
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"zero/rest"
|
||||
)
|
||||
|
||||
func RegisterHandlers(engine *rest.Engine) {
|
||||
func RegisterHandlers(engine *rest.Server) {
|
||||
engine.AddRoutes([]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
rest.RtConf
|
||||
rest.RestConf
|
||||
}
|
||||
`
|
||||
)
|
||||
|
||||
@@ -30,7 +30,7 @@ func main() {
|
||||
|
||||
ctx := svc.NewServiceContext(c)
|
||||
|
||||
engine := rest.MustNewEngine(c.RtConf)
|
||||
engine := rest.MustNewEngine(c.RestConf)
|
||||
defer engine.Stop()
|
||||
|
||||
handler.RegisterHandlers(engine, ctx)
|
||||
|
||||
Reference in New Issue
Block a user