Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Main command. Main = gcmd.Command{ Name: "main", Usage: "main", Brief: "start http server", Func: func(ctx context.Context, parser *gcmd.Parser) (err error) { s := g.Server() s.SetRewrite("/favicon.ico", "/resource/image/favicon.ico") s.Group("/", func(group *ghttp.RouterGroup) { group.Middleware(service.Middleware().MiddlewareHandlerResponse, service.Middleware().MiddlewareHandlerRequest) group.Bind( home.New(), ) }) s.Group("/", func(group *ghttp.RouterGroup) { group.Middleware(ghttp.MiddlewareHandlerResponse) group.Bind( hello.New(), ) }) s.Run() return nil }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.