Documentation
¶
Index ¶
- func Append(list any, elements ...any) ([]any, error)
- func DecodeBase64(input string) (string, error)
- func EncodeBase64(input string) string
- func First(list any) (any, error)
- func Get(key string, object map[string]any, defaultValue any) any
- func Keys(object map[string]any) []any
- func Last(list any) (any, error)
- func List(elements ...any) []any
- func Now() string
- func Object(keyAndValues ...any) map[string]any
- func Pick(object map[string]any, keys ...string) map[string]any
- func Prepend(list any, elements ...any) ([]any, error)
- func Quote(s any) string
- func Replace(toChange, toBe, s string) string
- func Set(key string, value any, object map[string]any) map[string]any
- func Sha256Sum(input string) string
- func Sha512Sum(input string) string
- func Split(sep, s string) []string
- func ToJSON(v any) string
- func ToLower(s string) string
- func ToUpper(s string) string
- func TrimPrefix(prefix, s string) string
- func TrimSpace(s string) string
- func TrimSuffix(suffix, s string) string
- func Truncate(length int, s string) string
- func UUIDV4() (string, error)
- func UUIDV6() (string, error)
- func UUIDV7() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBase64 ¶
DecodeBase64 decodes a Base64-encoded string and returns the original value.
func EncodeBase64 ¶
EncodeBase64 encodes the input string to its Base64 representation.
func First ¶
First returns the first element of list or nil when list is empty. It supports slices, arrays, and strings.
func Last ¶
Last returns the final element of list or nil when list is empty. It supports slices, arrays, and strings.
func Split ¶
Split splits the input string by the given separator and returns the resulting substrings.
func TrimPrefix ¶
TrimPrefix removes prefix from s when present.
func TrimSuffix ¶
TrimSuffix removes suffix from s when present.
func Truncate ¶
Truncate keeps a portion of s based on length. A positive length returns the prefix, a negative length preserves the suffix, and values outside the string bounds leave s unchanged.
Types ¶
This section is empty.