Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Http = &gcmd.Command{ Name: "http", Usage: "http", Brief: "start http server", Arguments: []gcmd.Argument{ {Name: "action", Short: "a", Brief: "run action", IsArg: true}, {Name: "names", Short: "n", Brief: "server names"}, {Name: "only-start", Short: "", Brief: "only start server", Orphan: true}, }, Func: func(ctx context.Context, parser *gcmd.Parser) (err error) { names = []string{"default"} p := parser.GetOpt("names") if !p.IsEmpty() { names = p.Strings() } switch parser.GetArg(2).String() { case "start": return startHttpServer(ctx, parser) default: gcmd.CommandFromCtx(ctx).Print() return nil } }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.