Versions in this module Expand all Collapse all v1 v1.0.0 Jan 28, 2026 Changes in this version + func BuildURL(base string, path string, params map[string]string) string + func Coalesce(strs ...string) string + func Contains(slice []string, target string) bool + func ContainsAny(slice []string, targets []string) bool + func DerefDefault[T any](p *T, defaultVal T) T + func Deref[T any](p *T) T + func Filter(slice []string, predicate func(string) bool) []string + func FormatDuration(d time.Duration) string + func GetEnv(key, defaultValue string) string + func GetEnvBool(key string, defaultValue bool) bool + func GetEnvInt(key string, defaultValue int) int + func GetEnvOptional(key string) string + func GoSafeGo(fn func()) + func IsEmpty(s string) bool + func JSONMarshal(v interface{}) string + func JSONMarshalIndent(v interface{}) string + func JSONParse(jsonStr string) (interface{}, error) + func JoinPath(parts ...string) string + func Map(slice []string, fn func(string) string) []string + func MapKeys[K comparable, V any](m map[K]V) []K + func MapValues[K comparable, V any](m map[K]V) []V + func MergeMaps[K comparable, V any](maps ...map[K]V) map[K]V + func MustJSONParse(jsonStr string) interface + func MustParseDuration(s string) time.Duration + func MustRetry(fn func() error, opts ...RetryOpts) + func Must[T any](v T, err error) T + func NewWrapError(message string, err error) error + func Now() string + func NowFormatted(format string) string + func ParseDuration(s string) (time.Duration, error) + func PtrZero[T comparable](v T) *T + func Ptr[T any](v T) *T + func Retry(fn func() error, opts ...RetryOpts) error + func SafeGo(fn func(), recoveryFn func(error)) + func SliceToMap[T any, K comparable](slice []T, keyFn func(T) K) map[K]T + func SplitTrim(s, delimiter string) []string + func ToBool(v interface{}, defaultValue bool) bool + func ToInt(v interface{}, defaultValue int) int + func ToSlice(s string) []string + func ToString(v interface{}) string + func TrimEmpty(strs []string) []string + func Truncate(s string, maxLen int) string + func Unique(slice []string) []string + func ValidateOneOf(fields map[string]string) error + func ValidateRequired(fields map[string]string) error + func Wrapf(err error, format string, args ...interface{}) error + type RetryOpts struct + BackoffFactor float64 + InitialDelay time.Duration + MaxAttempts int + MaxDelay time.Duration + func DefaultRetryOpts() RetryOpts + type WrapError struct + Err error + Message string + func (e *WrapError) Error() string + func (e *WrapError) Unwrap() error