cmd

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdd added in v1.3.0

func NewAdd(c *Cmd) *cobra.Command

NewAdd returns `add` command

func NewCurrent added in v1.3.0

func NewCurrent(c *Cmd) *cobra.Command

NewCurrent returns `current` command

func NewDel added in v1.3.0

func NewDel(c *Cmd) *cobra.Command

NewDel returns `del` command

func NewList added in v1.3.0

func NewList(c *Cmd) *cobra.Command

NewList returns `list` command

func NewUse added in v1.3.0

func NewUse(c *Cmd) *cobra.Command

NewUse returns `use` command

func NewVersion added in v1.3.0

func NewVersion(c *Cmd) *cobra.Command

NewVersion returns `version` command

Types

type Cmd added in v1.3.0

type Cmd struct {
	cobra.Command

	// Version is the version number or commit hash
	// These variables should be set by the linker when compiling
	Version string
	// CommitHash is the git hash of last commit
	CommitHash string
	// CompileDate is the date of build
	CompileDate string
	// contains filtered or unexported fields
}

Cmd is an CLI app

func New added in v1.3.0

func New() *Cmd

New returns an pre-initialized CLI app

func (*Cmd) Setup added in v1.3.0

func (c *Cmd) Setup()

Setup adds additional keys to CLI app

Jump to

Keyboard shortcuts

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