Documentation ¶
Index ¶
- Variables
- func Alert(a ...interface{}) (int, error)
- func Alertf(format string, a ...interface{}) (int, error)
- func Ask(question string, defaults ...string) (string, error)
- func Comment(a ...interface{}) (int, error)
- func Commentf(format string, a ...interface{}) (int, error)
- func Error(a ...interface{}) (int, error)
- func Errorf(format string, a ...interface{}) (int, error)
- func Info(a ...interface{}) (int, error)
- func Infof(format string, a ...interface{}) (int, error)
- func Line(a ...interface{}) (int, error)
- func Linef(format string, a ...interface{}) (int, error)
- func NewLine(length ...int) (int, error)
- func Secret(question string, defaults ...string) (string, error)
- func Success(a ...interface{}) (int, error)
- func Successf(format string, a ...interface{}) (int, error)
- func Warn(a ...interface{}) (int, error)
- func Warnf(format string, a ...interface{}) (int, error)
- func WithProgressBar(total int, fc func(bar *ProgressBar), opts ...ProgressBarOption)
- type ProgressBar
- type ProgressBarOption
- type Prompt
- type PromptOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Full = pb.Full Default = pb.Default Simple = pb.Simple FullTemplate = WithTemplate(Full) DefaultTemplate = WithTemplate(Default) SimpleTemplate = WithTemplate(Simple) )
Functions ¶
func WithProgressBar ¶ added in v2.5.0
func WithProgressBar(total int, fc func(bar *ProgressBar), opts ...ProgressBarOption)
Types ¶
type ProgressBar ¶
type ProgressBar struct { *pb.ProgressBar // contains filtered or unexported fields }
func NewProgressBar ¶
func NewProgressBar(total int, opts ...ProgressBarOption) *ProgressBar
type ProgressBarOption ¶
type ProgressBarOption func(*ProgressBar)
func WithTemplate ¶
func WithTemplate(template pb.ProgressBarTemplate) ProgressBarOption
type Prompt ¶
type Prompt struct {
// contains filtered or unexported fields
}
func NewPrompt ¶
func NewPrompt(question string, opts ...PromptOption) *Prompt
type PromptOption ¶
type PromptOption func(*Prompt)
func WithDefaultAnswer ¶
func WithDefaultAnswer(defaultAnswer string) PromptOption
func WithSecret ¶
func WithSecret() PromptOption
func WithTrimSpace ¶ added in v2.6.0
func WithTrimSpace(flag bool) PromptOption
Click to show internal directories.
Click to hide internal directories.