Documentation
¶
Index ¶
- func Contains(sslice []string, searchString string) bool
- func HasAnyPrefix(prefixes []string, theString string) bool
- func HumanizeDuration(d time.Duration) string
- func HumanizeTimestamp(t time.Time) string
- func IsSlicesEqual(sslice1, sslice2 []string) bool
- func NewLogger() log.Logger
- func NormalizeString(theString string) string
- func NormalizeStringSlice(sslice []string) []string
- func ParseClusterFromString(theString string) ([]string, error)
- func RemoveDuplicates(stringSlice []string) []string
- func StringToTimestamp(theString string) time.Time
- func TimeEndOfDay() time.Time
- func TimeStartOfDay() time.Time
- func TimestampToString(ts time.Time) string
- func ToSlackTable(values [][]string) *slack.Msg
- func TrimAnyPrefix(prefixes []string, theString string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasAnyPrefix ¶
HasAnyPrefix checks whether the given string starts with any of the prefixes.
func HumanizeDuration ¶
HumanizeDuration may be used to increase readability of a timestamp.
func HumanizeTimestamp ¶
HumanizeTimestamp may be used to increase readability of a timestamp.
func IsSlicesEqual ¶
IsSlicesEqual check whether the given slice have equal content but not necessarily in the same order.
func NormalizeString ¶
NormalizeString trims spaces and returns the string in lower case.
func NormalizeStringSlice ¶
NormalizeStringSlice normalizes all strings of the given slice.
func ParseClusterFromString ¶
ParseClusterFromString returns the cluster names found in the given string or an error.
func RemoveDuplicates ¶
RemoveDuplicates does what it says on the given string slice.
func StringToTimestamp ¶
StringToTimestamp converts a string to RFC 3339 timestamp.
func TimeEndOfDay ¶
func TimeStartOfDay ¶
func TimestampToString ¶
TimestampToString converts the given time to RFC 3339 format string.
func ToSlackTable ¶
ToSlackTable create a 2 column slack table using the TextBlockObjects. The input shall look like:
[][]string{ {"headerColumn1", "headerColumn2"}, {"valueLine1", "valueLine2"}, }
func TrimAnyPrefix ¶
TrimAnyPrefix trims any of the given prefixes from the string
Types ¶
This section is empty.