Documentation ¶
Index ¶
- func CutUrlHost(u string) string
- func DefaultVal[T any](v, defaults T) T
- func Defaults[T comparable](v, defaults T) T
- func FileExist(path string) bool
- func GetAnyVal[T any](v any, defaults T) T
- func GetContextVal[V, K any](ctx context.Context, k K, defaults V) V
- func IsImplements[T, A any](i A) (T, bool)
- func IsZero[T comparable](t T) bool
- func IsZeros(v any) bool
- func Or[T any](is bool, left, right T) T
- func ParseArgs[T any](defaults T, a ...any) T
- func RunFnWithTimeout(ctx context.Context, t time.Duration, call func(), a ...any) (err error)
- func RunFnWithTimeouts[A, V any](ctx context.Context, t time.Duration, ar A, call func(A) (V, error), a ...any) (v V, err error)
- func StructColumnToSlice[T any, M any](arr []M, field string) (r []T)
- func ToAny[T any](v T) any
- func ToBool[T comparable](t T) bool
- func ToBoolInt(t any) int8
- func UrlScheme(u string, isHttps bool) string
- type PaginationData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CutUrlHost ¶
func DefaultVal ¶
func DefaultVal[T any](v, defaults T) T
func Defaults ¶
func Defaults[T comparable](v, defaults T) T
func GetContextVal ¶
func IsImplements ¶
func IsZero ¶
func IsZero[T comparable](t T) bool
func RunFnWithTimeout ¶
func RunFnWithTimeouts ¶
func StructColumnToSlice ¶
func ToBool ¶
func ToBool[T comparable](t T) bool
Types ¶
type PaginationData ¶
Click to show internal directories.
Click to hide internal directories.