Documentation
¶
Index ¶
- Variables
- func BalancedWildcards(text string, dict map[string]string) bool
- func CopyDir(src, dst string, ignores []string) error
- func CopyFile(src, dst string) error
- func CronTask(spec string, callback func())
- func DelSliceElement[T any](list []T, idx int) []T
- func ExtractTextBetweenWildcards(text, start, end string) []string
- func FileMD5(fp string) (string, error)
- func GET(url string) ([]byte, error)
- func HTTP(url, method string, body []byte, headers map[string]string) ([]byte, error)
- func LogicalPaginate[T any](list []T, pageNo, pageSize int64) []T
- func MD5(text string) string
- func POST(url string, body []byte) ([]byte, error)
- func PathExists(src string) bool
- func RemoveSliceDuplicates[E comparable](slice []E) []E
- func Sign(params map[string]string, secret string) string
- func SimpleTask(duration time.Duration, callback func())
- func TimeoutTask(ctx context.Context, timeout time.Duration, ...) error
- func ZipCompress(files []string, des string, abs bool) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BalancedWildcards ¶
BalancedWildcards 判断文本中的通配符对是否配对
func DelSliceElement ¶
DelSliceElement 删除切片中某个下标的元素
func ExtractTextBetweenWildcards ¶
ExtractTextBetweenWildcards 提取被通配符包含的内容包含通配符本身
func LogicalPaginate ¶
LogicalPaginate 逻辑分页,返回分页后的数组
func RemoveSliceDuplicates ¶
func RemoveSliceDuplicates[E comparable](slice []E) []E
RemoveSliceDuplicates slice去重
func SimpleTask ¶
SimpleTask 简单的定时任务,不建议在生产环境中使用
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.