helpers

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: UPL-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrFormatMustSpecifyFlag format of error message when flag is supplied without a value.
	ErrFormatMustSpecifyFlag = "must specify %s using --%s or -%s"
	// ErrFormatNotEmpty format of error message when flag is supplied with empty value.
	ErrFormatNotEmpty = "%s can not be empty"
)

Variables

This section is empty.

Functions

func GetMandatoryStringFlagValueOrError

func GetMandatoryStringFlagValueOrError(cmd *cobra.Command, flagName string, flagShorthand string) (string, error)

GetMandatoryStringFlagValueOrError returns a non empty value of a flag or an error if the flag is not declared or the value is empty or nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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