Documentation
¶
Index ¶
- Constants
- func Bank(s string) string
- func BankFunc(s string, f func() string) string
- func ClearBank()
- func DeleteEmptyStringsFromArray(input []string) (output []string)
- func FormatBytes(numBytes int64) string
- func FormatUTCOffset(dur time.Duration) string
- func RandSeq(n int) string
- func StringSlicesEqual(left, right []string) bool
Constants ¶
View Source
const ( // KiB is bytes per Kibibyte KiB // MiB is bytes per Mebibyte MiB // GiB is bytes per Gibibyte GiB // TiB is bytes per Tebibyte TiB )
Variables ¶
This section is empty.
Functions ¶
func Bank ¶
Bank will return a non-copy of a string if it has been used before. Otherwise, it will store the string as the unique instance.
func BankFunc ¶ added in v1.97.0
BankFunc will use the provided s string to check for an existing allocation of the string. However, if no allocation exists, the f parameter will be used to create the string and store in the bank.
func DeleteEmptyStringsFromArray ¶ added in v1.99.0
DeleteEmptyStringsFromArray removes the empty strings from an array.
func FormatBytes ¶
FormatBytes takes a number of bytes and formats it as a string
func FormatUTCOffset ¶
FormatUTCOffset converts a duration to a string of format "-07:00"
func StringSlicesEqual ¶
StringSlicesEqual checks if two string slices with arbitrary order have the same elements
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.