cmd

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 12 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() (int, 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).

func SetOyaVersion added in v0.0.7

func SetOyaVersion(ver string)

Types

type ErrMissingTaskName

type ErrMissingTaskName struct{}

func (ErrMissingTaskName) Error

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