command

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrHaveLatestVersion is returned when you are already on the latest version.
	ErrHaveLatestVersion = errors.New("you already have the latest version")
	// ErrNewerVersion is returned when you are on a newer version that the latest release.
	ErrNewerVersion = errors.New("current version is newer than the latest release")
	// ErrIgnoredDev is returned when your local version is development and you have not used the --dev flag.
	ErrIgnoredDev = errors.New("ignoring update for development version")
)

Functions

func ChangeDefaultCommand added in v1.0.1

func ChangeDefaultCommand(cmd *cobra.Command, command string, blacklistedArgs ...string)

ChangeDefaultCommand checks to see if the current os.Args target a valid subcommand. If they do not they are adjusted to target the given command. If any of the blacklisted args are set in os.Args, no action is taken.

func NewRootCMD added in v1.0.0

func NewRootCMD() *cobra.Command

NewRootCMD returns the root command for use with cobra.

Types

This section is empty.

Jump to

Keyboard shortcuts

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