Versions in this module Expand all Collapse all v0 v0.19.4 Nov 1, 2026 Changes in this version + const EulerNumber + const GoldenRatio + const MaxSafeInteger64 + const MinSafeInteger64 + var MaxSafeInteger = getMaxSafeIntegerForArch() + var MinSafeInteger = getMinSafeIntegerForArch() + func Abs(n int64) (int64, error) + func Add(a, b int64) (int64, error) + func AddStringFieldAlias(aliases map[string]struct{}, name string) + func AsFloatSlice[T types.Float](s *Access, mode convert.RoundMode) ([]T, error) + func AsFloat[T types.Float](s *Access, mode convert.RoundMode, defaultValue ...T) T + func AsSlice[T types.Numerical](s *Access) ([]T, error) + func As[T types.Numerical](s *Access, defaultValue ...T) T + func Average(numbers []int64) (float64, error) + func BoolPtr(src *bool) bool + func BytesPtr(src *[]byte) []byte + func Clamp(value, min, max int64) (int64, error) + func Divide(a, b int64) (int64, error) + func DurationPtr(src *time.Duration) time.Duration + func ExtractGormColumnName(field reflect.StructField) string + func ExtractGormType(field reflect.StructField) string + func ExtractStructuredTagValue(tag string, key string) string + func Factorial(n int) (*big.Int, error) + func FastHash(s string) uint64 + func Fibonacci(n int) (int64, error) + func FieldNameAliases(name string) []string + func Float32Ptr(src *float32) float32 + func Float64Ptr(src *float64) float64 + func GCD(a, b int64) int64 + func GenericStructType[T any]() reflect.Type + func GetBool(m map[string]interface{}, key string) bool + func GetString(m map[string]interface{}, key string) string + func GetStringSlice(m map[string]interface{}, key string) []string + func HashToInt64(parts []string, separator string) int64 + func Int32Ptr(src *int32) int32 + func Int64Ptr(src *int64) int64 + func IntPtr(src *int) int + func IsPrime(n int64) bool + func IsType[T any](s *Access) bool + func LCM(a, b int64) (int64, error) + func Log(n, base float64) (float64, error) + func Max(numbers []int64) (int64, error) + func MergeWithDefaults[T any](st *T, defaultSts ...*T) *T + func Min(numbers []int64) (int64, error) + func Modulo(a, b int64) (int64, error) + func Multiply(a, b int64) (int64, error) + func Must[T any](s *Access) T + func NextPowerOfTwo(n int) int + func NormalizeStringFieldMapByTagType[T any](fields map[string]interface{}, tagName string, typeMatches func(string) bool, ...) + func NormalizeStringFieldsByTagType(target interface{}, tagName string, typeMatches func(string) bool, ...) + func OrDefault[T any](s *Access, defaultValue T) T + func Power(base, exp int64) (int64, error) + func Ptr[T any, R any](src *T, f func(T) R) *R + func ShortHash(s string) string + func ShortHashWithLength(s string, length int) string + func SlicePtr[T any](src *[]T) []T + func Sqrt(n float64) (float64, error) + func StringFieldAliasesByTagType[T any](tagName string, typeMatches func(string) bool) map[string]struct + func StringPtr(src *string) string + func Subtract(a, b int64) (int64, error) + func UintPtr(src *uint) uint + type Access struct + func Map[T any, R any](s *Access, fn func(T) R) *Access + func New(v interface{}) *Access + func (s *Access) AsBool() bool + func (s *Access) AsJSON(indent bool) (string, error) + func (s *Access) AsString(timeLayout ...string) string + func (s *Access) AsStringSlice() []string + func (s *Access) At(fieldPath string, defaultValue ...interface{}) *Access + func (s *Access) Bool(defaultValue ...bool) bool + func (s *Access) BoolAt(fieldPath string, defaultValue ...bool) bool + func (s *Access) Contains(target interface{}) bool + func (s *Access) Duration(defaultValue ...time.Duration) time.Duration + func (s *Access) DurationAt(fieldPath string, defaultValue ...time.Duration) time.Duration + func (s *Access) Field(fieldName string) *Access + func (s *Access) Filter(predicate func(interface{}) bool) *Access + func (s *Access) FlatMap(fn func(interface{}) *Access) *Access + func (s *Access) Float32(defaultValue ...float32) float32 + func (s *Access) Float64(defaultValue ...float64) float64 + func (s *Access) IfPresent(fn func(interface{})) *Access + func (s *Access) Int(defaultValue ...int) int + func (s *Access) Int32(defaultValue ...int32) int32 + func (s *Access) Int64(defaultValue ...int64) int64 + func (s *Access) IntAt(fieldPath string, defaultValue ...int) int + func (s *Access) IsBool() bool + func (s *Access) IsEmpty() bool + func (s *Access) IsMap() bool + func (s *Access) IsNonEmpty() bool + func (s *Access) IsNumber() bool + func (s *Access) IsSlice() bool + func (s *Access) IsString() bool + func (s *Access) IsValid() bool + func (s *Access) Keys() []string + func (s *Access) Len() int + func (s *Access) Map(fn func(interface{}) interface{}) *Access + func (s *Access) OrElse(alternative interface{}) *Access + func (s *Access) String(defaultValue ...string) string + func (s *Access) StringAt(fieldPath string, defaultValue ...string) string + func (s *Access) StringOr(defaultValue string) string + func (s *Access) StringOrAt(fieldPath string, defaultValue string) string + func (s *Access) Uint(defaultValue ...uint) uint + func (s *Access) Uint64(defaultValue ...uint64) uint64 + func (s *Access) Unless(predicate func(interface{}) bool, fn func(interface{}) interface{}) *Access + func (s *Access) Value() interface{} + func (s *Access) ValueAt(fieldPath string, defaultValue ...interface{}) interface{} + func (s *Access) Values() []interface{} + func (s *Access) When(predicate func(interface{}) bool, fn func(interface{}) interface{}) *Access + func (sa *Access) GetInt64Value(defaultValue int64) int64 + func (sa *Access) GetIntValue(defaultValue int) int + type KV map[K]V + func PtrKV[K comparable, V any](src *KV[K, V]) KV[K, V] + type NilPanicDetector struct + func NewNilPanicDetector() *NilPanicDetector + func (d *NilPanicDetector) GenerateReport() string + func (d *NilPanicDetector) GetFixSuggestions() []string + func (d *NilPanicDetector) GetIssues() []NilPanicIssue + func (d *NilPanicDetector) ScanDirectory(dirPath string) error + func (d *NilPanicDetector) ScanFile(filePath string) error + type NilPanicIssue struct + Code string + Column int + Description string + File string + Line int + Severity string + Type string + type RiskPattern struct + Description string + Name string + Pattern string + Severity string + type TemporalHasher struct + func NewTemporalHasher(opts ...TemporalHasherOption) *TemporalHasher + func (h *TemporalHasher) Hash(parts ...string) string + func (h *TemporalHasher) HashAt(t time.Time, parts ...string) string + func (h *TemporalHasher) HashMap(kvMap map[string]string) string + func (h *TemporalHasher) HashMapAt(t time.Time, kvMap map[string]string) string + func (h *TemporalHasher) IsExpired(hash string, parts ...string) bool + func (h *TemporalHasher) IsExpiredMap(hash string, kvMap map[string]string) bool + func (h *TemporalHasher) Length() int + func (h *TemporalHasher) Window() time.Duration + type TemporalHasherOption func(*temporalHasherConfig) + func WithLength(length int) TemporalHasherOption + func WithSeparator(separator string) TemporalHasherOption + func WithWindow(window time.Duration) TemporalHasherOption