Documentation ¶
Index ¶
- func AtLeastOneViperBoolFlagGiven(flags ...string) bool
- func AtLeastOneViperInt64FlagGiven(flags ...string) bool
- func AtLeastOneViperStringFlagGiven(flags ...string) bool
- func AtLeastOneViperStringSliceFlagGiven(flags ...string) bool
- func Edit(id string, getFunc func(id string) ([]byte, error), ...) error
- func HumanizeDuration(duration time.Duration) string
- func Prompt(msg, compare string) error
- func ReadFrom(from string, data interface{}, f func(target interface{})) error
- func Truncate(input, elipsis string, maxlength int) string
- func ViperBool(flag string) *bool
- func ViperInt64(flag string) *int64
- func ViperString(flag string) *string
- func ViperStringSlice(flag string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtLeastOneViperBoolFlagGiven ¶
AtLeastOneViperBoolFlagGiven ensure at least one bool flag is given
func AtLeastOneViperInt64FlagGiven ¶
AtLeastOneViperInt64FlagGiven ensure at least one int64 flag is given
func AtLeastOneViperStringFlagGiven ¶
AtLeastOneViperStringFlagGiven ensure at least one string flag is given
func AtLeastOneViperStringSliceFlagGiven ¶
AtLeastOneViperStringSliceFlagGiven ensure at least one string slice flag is given
func Edit ¶
func Edit(id string, getFunc func(id string) ([]byte, error), updateFunc func(filename string) error) error
Edit a yaml response from getFunc in place and call updateFunc after save
func HumanizeDuration ¶
HumanizeDuration format given duration human readable
func ReadFrom ¶
ReadFrom will either read from stdin (-) or a file path an marshall from yaml to data
func Truncate ¶
Truncate will trim a string in the middle and replace it with elipsis FIXME write a test
func ViperInt64 ¶
ViperInt64 returns the int64 pointer for the given flag
func ViperString ¶
ViperString returns the string pointer for the given flag
func ViperStringSlice ¶
ViperStringSlice returns the string slice for the given flag
Types ¶
This section is empty.