Documentation
¶
Index ¶
- Constants
- func AskUserForBool(question string, defaultValue bool) (bool, error)
- func AskUserForString(question string, defaultValue string) (string, error)
- func CheckFileExists(path string) (bool, error)
- func CheckIsStdin() (bool, error)
- func CountOccurrences(sl []string, s string) int
- func GenUserAgent(cupInfo types.CupInfo, cupConfig *config.CupConfig) string
- func GetSmallerDuration(d1, d2 time.Duration) time.Duration
- func GetStringSliceMode(sl []string) []string
- func LoadViperConfigFromStruct(cfg interface{}) error
- func PrettyPrintSYaml(t interface{}) (string, error)
- func StringSliceContains(s []string, str string) bool
- type RetryTimer
Constants ¶
View Source
const ConfigBytesStandin = "I am but a poor cup executable that was unable to marshal my config."
Variables ¶
This section is empty.
Functions ¶
func CheckFileExists ¶
func CheckIsStdin ¶
func CountOccurrences ¶
func GetStringSliceMode ¶
func LoadViperConfigFromStruct ¶
func LoadViperConfigFromStruct(cfg interface{}) error
LoadViperConfigFromStruct back-populates viper with the content of a struct.
func PrettyPrintSYaml ¶
PrettyPrintSYaml generates a pretty-ish YAML string
func StringSliceContains ¶
StringSliceContains returns `true` if the passed in string slice contains the passed in string, otherwise returns false.
Types ¶
type RetryTimer ¶
type RetryTimer struct {
// contains filtered or unexported fields
}
func NewRetryTimer ¶
func NewRetryTimer(backoffFactor int, maxWaitTime time.Duration) RetryTimer
func (*RetryTimer) AttemptFailed ¶
func (r *RetryTimer) AttemptFailed()
func (*RetryTimer) GetRetryDelay ¶
func (r *RetryTimer) GetRetryDelay() time.Duration
Click to show internal directories.
Click to hide internal directories.