ehelper
# 介绍
辅助函数模块
# 使用方法
import (
"github.com/wallace5303/ee-go/ehelper"
)
# API列表
仅做简单介绍。按照go标准,常量/函数/方法等说明信息,都在源码中。
# func FileIsExist(path string) bool
文件是否存在
# func IsDir(path string) bool
是否为目录
# func Mapserge(src, tgt map[string]any, itgt map[any]any)
合并map
# func GetJson() *ResultJson
获取返回值的json结构
# func GetRandomString(length int) string
获取一个随机字符串
# func Contains(str string, strs []string) bool
子字符串是否在字符串中
# func SlicesContains(slice []string, str string) bool
字符串是否在切片中
# func RemoveDuplicatedElem(slice []string) (ret []string)
去重切片
# func RandomSleep(minMills, maxMills int)
随机睡眠
上次更新: 2025/04/10, 03:07:49