Documentation
¶
Index ¶
- Variables
- func DisplayWidth(s string) int
- func Indent(s, indent string) string
- func IsUserCancellation(err error) bool
- func MutuallyExclusive(message string, conditions ...bool) error
- func PrintError(out io.Writer, err error, cmd *cobra.Command, debug bool)
- func ReplaceExcessiveWhitespace(s string) string
- func Truncate(maxWidth int, s string) string
- func TruncateColumn(maxWidth int, s string) string
- type FlagError
Constants ¶
This section is empty.
Variables ¶
View Source
var CancelError = errors.New("CancelError")
CancelError signals user-initiated cancellation
View Source
var SilentError = errors.New("SilentError")
SilentError is an error that triggers exit code 1 without any error messaging
Functions ¶
func DisplayWidth ¶
DisplayWidth calculates what the rendered width of a string may be
func IsUserCancellation ¶
func MutuallyExclusive ¶
func TruncateColumn ¶
TruncateColumn replaces the first new line character with an ellipsis and shortens a string to fit the maximum display width
Types ¶
Click to show internal directories.
Click to hide internal directories.