Documentation ¶
Index ¶
- func AddStringIfMissing(slice []string, s string) (bool, []string)
- func RandomAlphaNumString(length int64) (string, error)
- func RemoveString(slice []string, s string) (bool, []string)
- func ShortenMessage(message string, length int) (shortenedMessage string)
- func StringSliceContains(slice []string, elem string) bool
- func Trim(input string) (output string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddStringIfMissing ¶
AddStringIfMissing adds a string to a slice of strings The provided slice is not changed returns true, slice with appended string if string was not in the list returns false, old list if string was already in the list
func RandomAlphaNumString ¶
RandomAlphaNumString generates a random string value consisting of [0-9a-z] with a length as configured.
func RemoveString ¶
RemoveString removes a string from a slice of strings The provided slice is not changed returns true, slice with removed string if string was contained in the list returns false, old list if string was not in the list
func ShortenMessage ¶
ShortenMessage Removes line breaks and shortens the message
func StringSliceContains ¶
StringSliceContains determines whether the given string slice contains a given element.
Types ¶
This section is empty.