extutil

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 5 Imported by: 104

Documentation

Overview

Package extutil contains a variety of util functions that were identified as common code duplication. More specialized packages exist for groups of use cases (extlogging and exthttp) for example.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonMangle added in v1.7.14

func JsonMangle[T any](in T) T

func MaskString added in v1.7.18

func MaskString(s string, search string, remaining int) string

func MustHaveValue added in v1.8.15

func MustHaveValue[T any, K comparable](m map[K]T, key K) T

MustHaveValue panics if the given key is not present in the map or the value is nil or empty.

func Ptr

func Ptr[T any](val T) *T

Ptr returns a pointer to the given value. You will find this helpful when desiring to pass a literal value to a function that requires a pointer.

func ToBool added in v1.7.11

func ToBool(val any) bool

func ToInt added in v1.7.11

func ToInt(val any) int

func ToInt32 added in v1.7.19

func ToInt32(val any) int32

func ToInt64 added in v1.7.11

func ToInt64(val any) int64

func ToKeyValue added in v1.7.11

func ToKeyValue(config map[string]any, configName string) (map[string]string, error)

func ToString added in v1.7.11

func ToString(val any) string

func ToStringArray added in v1.7.13

func ToStringArray(s any) []string

func ToUInt added in v1.7.12

func ToUInt(val any) uint

func ToUInt64 added in v1.7.11

func ToUInt64(val any) uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL