Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface { // Description explains what this verb commands to do Description() string // Usage prints the syntax of arguments for this command Usage() string // SetupFlagSet is called to allow the command implementation // to setup which option flags it has. SetupFlagSet(flagSet *flag.FlagSet) // Execute is the main function here. It is responsible to // start the execution of the command. // // `args` are the arguments left unused by verb itself and options. Execute(ctx context.Context, cfg Config, args []string) error }
Command is an interface of implementations of command verbs (like "dump", "verify" etc of "afascli dump"/"afascli verify")
type Config ¶
type Config struct { IsQuiet bool FirmwareWandOptions []firmwarewand.Option }
type Descriptioner ¶
type Descriptioner interface {
Description() string
}
Descriptioner is the interface for error-s which requires method Description, which in turn is used to provide verbose explanation of how to interpret the error.
type ExitCoder ¶
type ExitCoder interface {
ExitCode() int
}
ExitCoder is an error signature used to override the exitcode in the end of main.main.
type SilentError ¶
type SilentError struct {
Err error
}
func (SilentError) Error ¶
func (err SilentError) Error() string
func (SilentError) Unwrap ¶
func (err SilentError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.