Documentation
¶
Index ¶
- func AnyToString(a any) (string, error)
- func AnyValueToString(k string, m map[string]any) (string, error)
- func First(vs ...string) string
- func FirstIn(m map[string]any, keys ...string) string
- func GenerateHash(input []byte) string
- func ParseBool(v string) bool
- func Preview(s string, size int) string
- func SliceToMap(ss []string) map[string]struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToString ¶
func FirstIn ¶
FirstIn returns the first entry in the map with a non-zero value when iterating the provided list of keys.
func GenerateHash ¶
func Preview ¶
Preview reduces the string to the specified size. If the string is longer than the size, the last three characters are replaced with an ellipsis. Size < 4 will default to 4. ex: Preview("123", 6) => "123" Preview("1234567", 6) "123..."
func SliceToMap ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.