cmd

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package cmd provides CLI implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	// Err contains error returned from the subcommand executed.
	Err error

	// Cmd contains the command object.
	Cmd *cobra.Command
}

Response wraps error for subcommand, and is returned from cmd package.

func Execute

func Execute() Response

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 (Response) IsUserError

func (r Response) IsUserError() bool

IsUserError indicates it is a user fault, and should display the command usage in addition to displaying the error itself.

Jump to

Keyboard shortcuts

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