Documentation ¶
Index ¶
- func All(tasks ...func())
- func Await[T any, V any, A ~[]T](task func(T) V, args *A) []V
- func AwaitWith[T any, V any, A ~[]T, R ~[]V](task func(T) V, args *A, results *R)
- func Clean(original string) string
- func Default[T comparable](a *T, b T)
- func FileNotExists(path string) bool
- func List(task func(i int), length int)
- func RandomLetter(n int) []rune
- func RandomNumber(digit int) int
- func RandomNumberMixString(digit, mix int) string
- func RandomString(digit int) string
- func Retry[T any](times, delay int, f any, args ...T)
- func SimilarText(first, second string) float64
- func Ternary[T any](expr bool, a, b T) T
- func Timer(uids ...string) gin.H
- type EventLoop
- type Set
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Default ¶
func Default[T comparable](a *T, b T)
func FileNotExists ¶
func RandomLetter ¶
随机字母
func Retry ¶
重试函数
times: 重试次数 负数则无限制
delay: 休眠秒数 每次重试间休眠时间
f: 要重试的函数 支持格式 func() bool 和 func(T) bool
args: 选填 当函数为后者时会自动将此参数中第一个(args[0])传入
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.