Documentation ¶
Index ¶
- Constants
- func BcryptCheckPassword(hashed, password string) (ok bool)
- func BcryptGeneratePassword(password string) (string, error)
- func CtxValue[T any](ctx context.Context, key interface{}) (T, bool)
- func CtxValueQty[T any](ctx context.Context, key interface{}) T
- func DecimalFromString(s string) decimal.Decimal
- func FindFirst[T any](arr []T, f func(T) bool) (T, bool)
- func IsNil(v any) bool
- func MD5Hex(v string) string
- func MD5HexBytes(v []byte) string
- func Pointer[T comparable](v T) *T
- func RandBytes(n int) []byte
- func RandDigits(n int) string
- func RandLetters(n int) string
- func RandLettersAndDigits(n int) string
- func RandLowLettersDigits(n int) string
- func RandLowerLetters(n int) string
- func RandStr(str string, n int) string
- func RandStringPointer(n int) *string
- func RoundDecimalToTickSize(price decimal.Decimal, tickSize float32) decimal.Decimal
- func Seconds[T constraints.Integer](cnt T) time.Duration
- func SecondsNum[T constraints.Integer](d time.Duration) T
- func SplitHostPort(addr string) (host string, port string)
- func ToList[T, U any](tList []T, toFn ToFn[T, U], skipFn SkipToFn[T, U]) []U
- type SkipToFn
- type ToFn
Constants ¶
View Source
const ( Letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" LowerLetters = "abcdefghijklmnopqrstuvwxyz" Digits = "0123456789" LettersAndDigits = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" LowLettersDigits = "abcdefghijklmnopqrstuvwxyz0123456789" )
Variables ¶
This section is empty.
Functions ¶
func BcryptCheckPassword ¶
func BcryptGeneratePassword ¶
func CtxValueQty ¶
func DecimalFromString ¶
func MD5HexBytes ¶
func Pointer ¶
func Pointer[T comparable](v T) *T
func RandDigits ¶
func RandLetters ¶
func RandLettersAndDigits ¶
func RandLowLettersDigits ¶
func RandLowerLetters ¶
func RandStringPointer ¶
func RoundDecimalToTickSize ¶
func SecondsNum ¶
func SecondsNum[T constraints.Integer](d time.Duration) T
func SplitHostPort ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.