cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ExecuteE

func ExecuteE() error

ExecuteE executes a command same as Execute but returns error.

func ResetFlags

func ResetFlags()

Reset all flags for all commands to their default values (testing).

func SetOutput

func SetOutput(out io.Writer)

SetOutput overrides cobra output (for testing).

Types

type ErrMissingTaskName added in v0.0.2

type ErrMissingTaskName struct{}

func (ErrMissingTaskName) Error added in v0.0.2

func (e ErrMissingTaskName) Error() string

Notes

Bugs

  • I don't know how to set default value for StringArray flag type.

  • Yack. This is what has to be done to support arbitrary flags passed to tasks.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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