cmd

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2018 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrShowedHelp = errors.New("already showed help")

ErrShowedHelp is used in parsing argument function of subcommand when the subcommand showed help. Then caller can exit successfully and silently.

Functions

func Run added in v0.2.2

func Run(subCmd string, args []string) int

Run is invoked by main(), each argument means 'volt {subcmd} {args}'.

Types

type Cmd added in v0.2.2

type Cmd interface {
	ProhibitRootExecution(args []string) bool
	Run(args []string) int
	FlagSet() *flag.FlagSet
}

Cmd represents volt's subcommand interface. All subcommands must implement this.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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