# README
go-utils
Simple utilities
Function suffixes
--A
Functions ends with A
are functions that calls predicate functions with
current index and original array.
# Functions
ApplyFunc applies the given function to each element of the slice.
ApplyFuncA applies the given function to each element of the slice.
No description provided by the author
ComparePassword compares a password with an encoded hash to check if they match.
No description provided by the author
No description provided by the author
FilterFunc returns a new slice containing only the elements of the original slice that satisfy the predicate function.
FilterFuncA returns a new slice containing only the elements of the original slice that satisfy the predicate function.
GetEnv returns the value of the environment variable named by the key.
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
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
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
GetEnvWithDefault returns the value of the environment variable named by the key.
GetEnvWithDefaultNE returns the value of the environment variable named by the key.
HashPassword generates a new password hash using the argon2id algorithm.
HashPassword generates a new password hash using the argon2id algorithm.
No description provided by the author
IntersectFunc returns a new slice containing the intersection of two slices based on the result of the predicate function.
IntersectFuncA returns a new slice containing the intersection of two slices based on the result of the predicate function.
JoinInteger converts a slice of integers to a string, joining them with the separator.
No description provided by the author
MapToAny converts an element of specific type to an element of type any, returning an error if the conversion is not possible.
MapToType converts an element of interface{} to an element of specific type, returning an error if the conversion is not possible.
MapToTypeE converts an element of interface{} to an element of specific type, returning an error if the conversion is not possible.
No description provided by the author
No description provided by the author
NewUuid returns a new UUID.
PanicIfError panics if the error is not nil.
Pluck extracts a list of values from a slice of structs.
PluckA extracts a list of values from a slice of structs.
Ptr returns a pointer to the value.
No description provided by the author
No description provided by the author
No description provided by the author
RequestBaseUrl returns the base URL of the request.
RequestFullUrl returns the full URL of the request.
RequestUriWithoutSchemeHost returns a new URL instance without scheme and host (domain).
RequestUrlWithoutQueryParams returns a new URL instance without specified query parameters.
RequestUrlWithQueryParam returns a new URL instance with the given query parameter set.
RequestUrlWithQueryParams returns a new URL instance with the given query parameters set.
ReturnOrPanic returns the value if the error is nil, otherwise panics.
SliceFindFunc returns the first element in the slice that satisfies the predicate function, or the zero value of the element type if none is found.
SliceFindFuncA returns the first element in the slice that satisfies the predicate function, or the zero value of the element type if none is found.
SliceMapFunc applies the predicate function to each element of the slice, returning a new slice with the results.
SliceMapFuncA applies the predicate function to each element of the slice, returning a new slice with the results.
SliceMapFuncAE applies the predicate function to each element of the slice, returning a new slice with the results.
SliceMapFuncE applies the predicate function to each element of the slice, returning a new slice with the results.
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
UrlWithoutQueryParams returns a URL without specified query parameters.
UrlWithQueryParam returns a URL with the given query parameters set.
UrlWithQueryParams returns a URL with the given query parameters set.
No description provided by the author
# Constants
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
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
Integer is a type constraint that includes all integer types.
No description provided by the author
No description provided by the author