server

package
v0.0.0-...-94aa108 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL