cmd

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 20 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.

Types

type ErrorHandler

type ErrorHandler struct {
	// contains filtered or unexported fields
}

ErrorHandler handles errors

func (ErrorHandler) HandleError

func (eh ErrorHandler) HandleError(step string, err error)

HandleError handles the given error

func (ErrorHandler) HandleErrorWithOutput added in v0.1.9

func (eh ErrorHandler) HandleErrorWithOutput(step string, err error, output string)

HandleErrorWithOutput handles the given error and prints output

func (ErrorHandler) PrintError added in v0.1.7

func (eh ErrorHandler) PrintError(step string, err error)

PrintError prints the error, no exit

func (ErrorHandler) PrintErrorWithOutput added in v0.1.9

func (eh ErrorHandler) PrintErrorWithOutput(step string, err error, output string)

PrintErrorWithOutput prints the given error and output

type SemanticVersion added in v0.1.7

type SemanticVersion struct {
	Major int
	Minor int
	Patch int
}

SemanticVersion is a struct for semantic version

func NewSemanticVersion added in v0.1.7

func NewSemanticVersion(version string) (SemanticVersion, error)

NewSemanticVersion creates a new instance of semantic version

func (SemanticVersion) String added in v0.1.7

func (sv SemanticVersion) String() string

Jump to

Keyboard shortcuts

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