base

package
v0.0.0-...-a7e320e Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Go = &Command{
	UsageLine: "go",
	Long:      "Go is a tool for managing Go source code.",
}
View Source
var Usage func()

Functions

func Errorf

func Errorf(format string, args ...interface{})

func Exit

func Exit()

func Fatalf

func Fatalf(format string, args ...interface{})

func SetExitStatus

func SetExitStatus(n int)

Types

type Command

type Command struct {
	//
	Run func(cmd *Command, args []string)

	UsageLine string

	// go 或 go help
	// 简短的内容
	Short string

	// go help <命令> 输出的内容输出
	// 命令完整的内容
	Long string

	// Flag是特定于此命令的一组标志。
	Flag flag.FlagSet
	// 存储不同的Command打印内容
	// bug
	// build
	// clean
	// doc
	// dev
	// ...
	Commands []*Command
}

func (*Command) LongName

func (c *Command) LongName() string

func (*Command) Name

func (c *Command) Name() string

func (*Command) Runnable

func (c *Command) Runnable() bool

func (*Command) Usage

func (c *Command) Usage()

Jump to

Keyboard shortcuts

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