# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
BoolPtr Deprecated: make use of ToPtr instead.
CamelToSnakeCase convert "camelCase" string to "snake-case".
ConvertSlice attempt to convert []interface{} to []elementType using the first element's type.
FindMutableContext search for MutableContext from given context.Context's inheritance hierarchy, and return a MutableContextAccessor for key-values manipulation.
Float64Ptr Deprecated: make use of ToPtr instead.
FromPtr will take a pointer type and return its value if it is not nil.
IntPtr Deprecated: make use of ToPtr instead.
MakeMutableContext return the context itself if it's already a MutableContext and no additional ContextValuer are specified.
MustSetIfNotNil takes "src" pointer (e.g.
MustSetIfNotZero takes "src" value (e.g.
No description provided by the author
NewMutableContext Wrap given context.Context with a mutable store and optionally additional KV sources defined as ContextValuernolint:contextcheck // false positive - Non-inherited new context, use function like `context.WithXXX` instead.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RandomInt64N returns, as an int64, a non-negative uniform number in the half-open interval [0,n).
RandomIntN returns, as an int64, a non-negative uniform number in the half-open interval [0,n).
RandomString returns a random Alphanumeric string of given "length" this function uses "crypto/rand" and fallback to "math/rand" It panics if len(charset) > 255, and returns empty string if length is non-positive.
RandomStringWithCharset returns a random string of given "length" containing only characters from given "charset" this function uses "crypto/rand" and fallback to "math/rand" It returns empty string if length is non-positive, and only the first 256 chars in "charset" are used.
RecoverableFunc wrap a panicing function with following signature - func() - func() error into a func() error, where the recovered value is converted to error This function panics if the given function has incorrect signature.
Remove will not keep the ordering of the slice.
RemoveStable will remove an element from the slice and keep its order.
Reverse will reverse the order of the given slice.
SetIfNotNil is equivalent of MustSetIfNotNil, this function returns error instead of panic.
SetIfNotZero is equivalent of MustSetIfNotZero, this function returns error instead of panic.
StringPtr Deprecated: Make use of ToPtr instead.
ToPtr will return a pointer to any given input Example usage:
var stringPtr *string stringPtr = ToPtr("hello world")
// or some complex types var funcPtr *[]func(arg *argType) funcPtr = ToPtr([]func(arg *argType){}).
UIntPtr Deprecated: make use of ToPtr instead.
No description provided by the author
UuidPtr Deprecated: make use of ToPtr instead.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
time.RFC3339.
# Interfaces
ListableContext is supplementary interface of MutableContext, listing all values stored in the context.
MutableContext wraps context.Context with an internal KV pairs storage.
No description provided by the author
A SupportedRecoverableFunc is a function that can be converted by RecoverableFunc.
# Type aliases
CommaSeparatedSlice alias of []string that can deserialize from comma delimited string.
ContextValuer is an additional source of context.Context.Value(any)) used by MutableContext to search values with key.
No description provided by the author
No description provided by the author
RandomCharset is a string containing all acceptable UTF-8 characters for random string generation.
No description provided by the author
No description provided by the author