Versions in this module Expand all Collapse all v0 v0.14.0 Apr 24, 2024 v0.13.0 Feb 27, 2024 Changes in this version + const ISO8601Milliseconds + const ISO8601Seconds + var FALSE = false + var MaxTime = time.Unix(1<<63-1, 0).UTC() + var TRUE = true + func BoolPtr(v bool) *bool + func CamelToSnakeCase(camelCase string) string + func ConvertSlice(slice []interface{}) interface + func Float64Ptr(v float64) *float64 + func FromPtr[T primitives](t *T) T + func IntPtr(v int) *int + func MustSetIfNotNil(dst interface{}, src interface{}) + func MustSetIfNotZero(dst interface{}, src interface{}) + func ParseDuration(v string) time.Duration + func ParseString(s string) interface + func ParseTime(layout, v string) time.Time + func ParseTimeISO8601(v string) time.Time + func RandomInt64N(n int64) int64 + func RandomIntN(n int) int + func RandomString(length int) string + func RandomStringWithCharset(length int, charset RandomCharset) string + func RecoverableFunc[T SupportedRecoverableFunc](panicingFunc T) func() error + func RemoveStable[T any](slice []T, index int) []T + func Remove[T any](slice []T, index int) []T + func Reverse[T any](input []T) + func SetIfNotNil(dst interface{}, src interface{}) (err error) + func SetIfNotZero(dst interface{}, src interface{}) (err error) + func StringPtr(v string) *string + func ToPtr[T any](t T) *T + func UIntPtr(v uint) *uint + func UnQuote(s string) string + func UuidPtr(v uuid.UUID) *uuid.UUID + type CommaSeparatedSlice []string + func (s *CommaSeparatedSlice) UnmarshalJSON(data []byte) error + func (s *CommaSeparatedSlice) UnmarshalText(data []byte) error + func (s CommaSeparatedSlice) MarshalText() ([]byte, error) + func (s CommaSeparatedSlice) String() string + type ContextValuer func(key interface{}) interface + type Duration time.Duration + func (d *Duration) UnmarshalText(text []byte) error + func (d Duration) MarshalText() (text []byte, err error) + type GenericSet map[T]void + func NewGenericSet[T comparable](values ...T) GenericSet[T] + func (s *GenericSet[T]) UnmarshalJSON(data []byte) error + func (s GenericSet[T]) Add(values ...T) GenericSet[T] + func (s GenericSet[T]) Copy() GenericSet[T] + func (s GenericSet[T]) Equals(another GenericSet[T]) bool + func (s GenericSet[T]) Has(value T) bool + func (s GenericSet[T]) HasAll(values ...T) bool + func (s GenericSet[T]) MarshalJSON() ([]byte, error) + func (s GenericSet[T]) Remove(values ...T) GenericSet[T] + func (s GenericSet[T]) Values() []T + type ListableContext interface + Values func() map[interface{}]interface{} + type MutableContext interface + Set func(key, value any) + func MakeMutableContext(parent context.Context, valuers ...ContextValuer) MutableContext + func NewMutableContext(parent context.Context, valuers ...ContextValuer) MutableContext + type MutableContextAccessor interface + Set func(key, value any) + Values func() (values map[any]any) + func FindMutableContext(ctx context.Context) MutableContextAccessor + type RandomCharset string + const CharsetAlphabetic + const CharsetAlphanumeric + type Set map[interface{}]void + func (s *Set) UnmarshalJSON(data []byte) error + func (s Set) Add(values ...interface{}) Set + func (s Set) Copy() Set + func (s Set) Equals(another Set) bool + func (s Set) Has(value interface{}) bool + func (s Set) HasAll(values ...interface{}) bool + func (s Set) MarshalJSON() ([]byte, error) + func (s Set) Remove(values ...interface{}) Set + func (s Set) Values() []interface{} + func NewSet(values ...interface{}) Set + func NewSetFrom(i interface{}) Set + func NewSetFromStringSet(stringSet StringSet) Set + type StringSet map[string]void + func NewStringSet(values ...string) StringSet + func NewStringSetFrom(i interface{}) StringSet + func NewStringSetFromSet(set Set) StringSet + func (s *StringSet) UnmarshalJSON(data []byte) error + func (s StringSet) Add(values ...string) StringSet + func (s StringSet) Copy() StringSet + func (s StringSet) Equals(another StringSet) bool + func (s StringSet) Has(value string) bool + func (s StringSet) HasAll(values ...string) bool + func (s StringSet) MarshalJSON() ([]byte, error) + func (s StringSet) Remove(values ...string) StringSet + func (s StringSet) ToSet() Set + func (s StringSet) Values() []string + type SupportedRecoverableFunc interface