Documentation
¶
Index ¶
- func HasDigit(s string) error
- func HasUppercase(s string) error
- func IsEmail(s string) error
- func IsInteger(s string) error
- func IsNumeric(s string) error
- func NotEmpty(s string) error
- type Choice
- type Clio
- func (c *Clio) Ask(question string, validate ValidatorFn) string
- func (c *Clio) AskHidden(question string, validate ValidatorFn) (string, error)
- func (c *Clio) Banner()
- func (c *Clio) Confirm(question string, defaultVal bool) bool
- func (c *Clio) Debug(format string, args ...any)
- func (c *Clio) Error(format string, args ...any)
- func (c *Clio) Fatal(format string, args ...any)
- func (c *Clio) Info(format string, args ...any)
- func (c *Clio) List(title string, elements []string)
- func (c *Clio) MultipleChoice(question string, choices []Choice) string
- func (c *Clio) PickInRange(min, max int) int
- func (c *Clio) SetBanner(template string, values ...any)
- func (c *Clio) Success(format string, args ...any)
- func (c *Clio) Warn(format string, args ...any)
- type ValidatorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasUppercase ¶
Types ¶
type Clio ¶
type Clio struct {
// contains filtered or unexported fields
}
func (*Clio) AskHidden ¶
func (c *Clio) AskHidden(question string, validate ValidatorFn) (string, error)
func (*Clio) MultipleChoice ¶
func (*Clio) PickInRange ¶
type ValidatorFn ¶
func Between ¶
func Between(min, max float64) ValidatorFn
func Chain ¶
func Chain(validators ...ValidatorFn) ValidatorFn
func GreaterThan ¶
func GreaterThan(min float64) ValidatorFn
func LessThan ¶
func LessThan(max float64) ValidatorFn
func Matches ¶
func Matches(pattern string) ValidatorFn
func MaxLength ¶
func MaxLength(max int) ValidatorFn
func MinLength ¶
func MinLength(min int) ValidatorFn
Click to show internal directories.
Click to hide internal directories.