Documentation ¶
Index ¶
- func BoldString(msg string) string
- func BoldStringf(msg string, a ...interface{}) string
- func DisplayPath(path string) string
- func ErrorString(msg string) string
- func ErrorStringf(msg string, a ...interface{}) string
- func FaintString(msg string) string
- func FaintStringf(msg string, a ...interface{}) string
- func Indent(s, indent string) string
- func LinkString(msg string) string
- func LinkStringf(msg string, a ...interface{}) string
- func PrimaryString(msg string) string
- func PrimaryStringf(msg string, a ...interface{}) string
- func PrintError(w io.Writer, msg string)
- func PrintErrorf(w io.Writer, msg string, a ...interface{})
- func PrintSuccess(w io.Writer, msg string)
- func PrintSuccessf(w io.Writer, msg string, a ...interface{})
- func PrintUnexpectedErrorStack(out io.Writer, err error)
- func PrintUsage(cmd *cobra.Command)
- func PrintWarning(w io.Writer, msg string)
- func PrintWarningf(w io.Writer, msg string, a ...interface{})
- func SecondaryLinkString(msg string) string
- func SecondaryLinkStringf(msg string, a ...interface{}) string
- func StringPrompt(label string, validate ValidateFn) string
- func StripColor(str string) string
- func SuccessString(msg string) string
- func SuccessStringf(msg string, a ...interface{}) string
- func UnderlineString(msg string) string
- func UnderlineStringf(msg string, a ...interface{}) string
- func WarningString(msg string) string
- func WarningStringf(msg string, a ...interface{}) string
- func YesNoPrompt(label string) bool
- type Spinner
- type SpinnerFunc
- type SpinnerOptions
- type ValidateFn
- type WriteWarningFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoldString ¶
func BoldStringf ¶
func DisplayPath ¶
func ErrorString ¶
func ErrorStringf ¶
func FaintString ¶
func FaintStringf ¶
func LinkString ¶
func LinkStringf ¶
func PrimaryString ¶
func PrimaryStringf ¶
func PrintError ¶
func PrintErrorf ¶
func PrintSuccess ¶
func PrintSuccessf ¶
func PrintUnexpectedErrorStack ¶ added in v0.9.17
PrintUnexpectedErrorStack prints a full stack trace of a fatal error.
func PrintUsage ¶ added in v0.9.9
func PrintWarning ¶
func PrintWarningf ¶
func SecondaryLinkString ¶ added in v0.9.19
func SecondaryLinkStringf ¶ added in v0.9.19
func StringPrompt ¶ added in v0.9.19
func StringPrompt(label string, validate ValidateFn) string
StringPrompt provides a single line for user input. It accepts an optional validation function.
func StripColor ¶
func SuccessString ¶
func SuccessStringf ¶
func UnderlineString ¶
func UnderlineStringf ¶
func WarningString ¶
func WarningStringf ¶
func YesNoPrompt ¶ added in v0.9.19
YesNoPrompt provides a yes/no user input. "No" is a default answer if left empty.
Types ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
func NewSpinner ¶
func NewSpinner(msg string, opts SpinnerOptions) *Spinner
func (*Spinner) SuccessWithMessage ¶ added in v0.9.12
type SpinnerFunc ¶ added in v0.9.22
SpinnerFunc defines a function that returns a Spinner which can be used to report the progress of a certain action.
type SpinnerOptions ¶
type ValidateFn ¶ added in v0.9.19
ValidateFn represents a validation function type for prompts. Function of this type should accept a string input and return an error if validation fails; otherwise return nil.
type WriteWarningFunc ¶ added in v0.9.22
type WriteWarningFunc func(msg string)
WriteWarningFunc defines an interface that writes the provided msg as a warning to an underlying writer.
Click to show internal directories.
Click to hide internal directories.