package
1.3.1
Repository: https://github.com/kumparan/go-lib.git
Documentation: pkg.go.dev

# Functions

ArrayStringPointer2ArrayInt64 :nodoc:.
Bool2String :nodoc: DEPRECATED never use this no more.
BoolPointerToBool :nodoc:.
ContainsInt64 tells whether a slice contains x.
ContainsString tells whether a slice contains x.
DifferenceInt64 :nodoc:.
DifferenceString :nodoc:.
Dump to json using json marshal.
DumpIncomingContext :nodoc:.
DumpOutGoingContext :nodoc:.
Float64PointerToFloat64 :nodoc:.
FormatTimeRFC3339 Format time according to RFC3339Nano.
GenerateID based on current time.
GenerateRandomBytes adapted from https://elithrar.github.io/article/generating-secure-random-numbers-crypto-rand/ GenerateRandomBytes returns securely generated random bytes.
GenerateRandomString returns a securely generated random string.
GenerateRandomStringURLSafe returns a URL-safe, base64 encoded securely generated random string.
GenerateSlug -> Replace space with dash, lower it, and trim the space DEPRECATED never use this no more.
GetIDFromSlug :nodoc:.
GraphQLID2Int32 :nodoc:.
GraphQLID2Int64 :nodoc:.
GraphQLID2String :nodoc:.
GraphQLIDPointer2Int32 :nodoc:.
GraphQLIDPointer2Int64 :nodoc:.
GraphQLIDPointer2String :nodoc:.
Int32PointerToInt32 :nodoc:.
Int32PointerToInt64 :nodoc:.
Int642GraphQLID :nodoc:.
Int642String :nodoc: DEPRECATED never use this no more.
Int64WithLimit -> Check req value bigger or not from limit.
InterfaceBytesToInt64 will transform cached value that get from the redis to Int64.
IsEmailValid -> validate email using regex.
IsNumeric -> Check if input string is int.
IsSameSliceIgnoreOrder to compare slice without order.
JSON2Map :nodoc: DEPRECATED never use this no more.
LimitOrDefault -> Check limit value.
Offset to get offset from page and limit, min value for page = 1.
PageOrDefault -> Check page value, and return 1 if page is not defined DEPRECATED never use this no more.
RegexEmail returns regex for email.
Retry :nodoc:.
SliceAtoi -> convert array of string to array of integer.
SlicePointerInt32PointerToSliceInt64 :nodoc:.
StandardizeSpaces -> Join long query to one line query.
String2Bool :nodoc:.
String2Int64 :nodoc:.
String2Int64WithDefault :nodoc:.
StringPointer2Float64 :nodoc:.
StringPointer2Int64 :nodoc:.
StringPointer2String :nodoc:.
Ternary if condition is true, return a else b.
ToByte :nodoc:.
UnescapeString UTF-8 string e.g.
UniqInt64 :nodoc:.
UniqString :nodoc:.

# Structs

RetryStopper :nodoc:.