Documentation ¶
Index ¶
- func CommonInitialization()
- func ConfigureViper()
- func DecodeGob(e interface{}, b []byte) error
- func DoMemoryProfile()
- func DumpLine(lst []string) string
- func DumpLines(lst []string) []string
- func EncodeToFile(data interface{}, filePath string) error
- func FatalIf(err error)
- func FileExists(filePath string) bool
- func FormatCompletion(lines []string) string
- func GetFromHttpServer(url string) (http.Header, []byte, error)
- func HeadFromHttpServer(url string) (http.Header, error)
- func IsAddressReachable(address string) bool
- func IsCharIn(c byte, slice []byte) bool
- func IsStringExcluded(s string, regexps []*regexp.Regexp) bool
- func IsStringIn(element string, slice []string) bool
- func IsStringIncluded(s string, regexps []*regexp.Regexp) bool
- func IsStringMatching(s string, regexps []*regexp.Regexp) bool
- func JoinSlicesOrNone(sl []string, sep string) string
- func JoinSlicesWithMaxOrNone(sl []string, max int, sep string) string
- func JoinStringMap(m map[string]string, exclude map[string]string, sep string) []string
- func LastURLPart(url string) string
- func LoadGobFromFile(e interface{}, filePath string) error
- func ParseTimestamp(s string) (time.Time, error)
- func RemoveTempDir(tempDir string)
- func SetCommonCliFlags(fs *pflag.FlagSet, defaultLogLevel string)
- func StringMapsEqual(a map[string]string, b map[string]string) bool
- func StringSliceToRegexps(s []string) ([]*regexp.Regexp, error)
- func StringSliceToSet(lst []string) map[string]bool
- func StringSlicesEqual(a []string, b []string) bool
- func TimeToAge(t time.Time) string
- func TruncateString(s string, max int) string
- type LogConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommonInitialization ¶
func CommonInitialization()
func ConfigureViper ¶
func ConfigureViper()
func DoMemoryProfile ¶ added in v3.0.3
func DoMemoryProfile()
func EncodeToFile ¶
func FileExists ¶
func FormatCompletion ¶
func IsAddressReachable ¶
func IsStringExcluded ¶
IsStringExcluded returns true if one of the regexp match the input string
func IsStringIn ¶
func IsStringIncluded ¶
IsStringIncluded returns true if one of the regexp match the input string
func JoinSlicesOrNone ¶
JoinSlicesOrNone joins a slice of string with separator or display None if there's no elements
func JoinSlicesWithMaxOrNone ¶
JoinSlicesWithMaxOrNone joins a slice of string with separator up to x elements. Display None if there's no elements
func JoinStringMap ¶
JoinStringMap generates a list of map element separated by string excluding keys in excluded maps
func LastURLPart ¶
LastURLPart extracts the last part of the url
func LoadGobFromFile ¶
func RemoveTempDir ¶
func RemoveTempDir(tempDir string)
func SetCommonCliFlags ¶
func StringMapsEqual ¶
StringMapsEqual returns true if maps are equals
func StringSliceToSet ¶
StringSliceToSet converts a string slice to a set like map
func StringSlicesEqual ¶
StringSlicesEqual returns true if slices are equals
func TruncateString ¶
TruncateString truncates a string to a given maximum