Documentation ¶
Index ¶
- func ArrayToMap[K Hashable, V any](arr []K, defVal V) map[K]V
- func ArrayToMapUniversal[K, R any, V Hashable](arr []K, val func(K) R, key func(K) V) map[V]R
- func DecodeBase64(data string) (string, error)
- func EncodeBase64(data string) string
- func RandomString(l ...int) string
- func ReadConfig(parseTo interface{}, names ...string) error
- func SHA256(data string) string
- func Sleep(d time.Duration) bool
- func SleepHours(hours int) bool
- func SleepMinutes(min int) bool
- func SleepSeconds(sec int) bool
- func Ternary[K any](condition bool, v1, v2 K) K
- func UnpackDefault[K any](arr []K, defVal K) K
- func ValidateEmail(email string) bool
- type Hashable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayToMap ¶
func ArrayToMapUniversal ¶
func DecodeBase64 ¶
func EncodeBase64 ¶
func RandomString ¶
RandomString was taken from https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go
func ReadConfig ¶
func SleepHours ¶
func SleepMinutes ¶
func SleepSeconds ¶
func UnpackDefault ¶
func UnpackDefault[K any](arr []K, defVal K) K
func ValidateEmail ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.