command

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGlobalFlags added in v1.1.0

func GetGlobalFlags() []cli.Flag

func NewCommand

func NewCommand(name, desc string, command Command) *cli.Command

NewCommand 创建Command.

Types

type Command

type Command interface {
	Flag() []cli.Flag                                     // 获取flag
	InitConfig(context *cli.Context) (interface{}, error) // 获取配置信息
	Run(ctx context.Context) error                        // 允许命令
}

Directories

Path Synopsis
wrk

Jump to

Keyboard shortcuts

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