Documentation ¶
Index ¶
- func CreateDir(dirs ...string) (err error)
- func DeLFile(filePath string) error
- func FileExist(path string) bool
- func FileMove(src string, dst string) (err error)
- func GenValidateCode(width int, codeType uint8) string
- func Get(Url string) ([]byte, error)
- func GrpcWithConsul(serverName string) (*grpc.ClientConn, error)
- func IsContain(items []string, item string) bool
- func Md5(s []byte) string
- func Min(nums ...float64) float64
- func NewConsulClient(address, token string) (apiClient *consulapi.Client, err error)
- func PathExists(path string) (bool, error)
- func PostForm(Url string, data map[string]string) ([]byte, error)
- func Reload(sss ...func()) error
- func TrimSpace(target interface{})
- func ZipFiles(filename string, files []string, oldForm, newForm string) error
- type URLUtil
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileMove ¶
FileMove @function: FileMove @description: 文件移动供外部调用 @param: src string, dst string(src: 源位置,绝对路径or相对路径, dst: 目标位置,绝对路径or相对路径,必须为文件夹) @return: err error
func GenValidateCode ¶
GenValidateCode 生成随机数 如:短信验证码等 codeType为1时候,字符串和数字
func GrpcWithConsul ¶
func GrpcWithConsul(serverName string) (*grpc.ClientConn, error)
GrpcWithConsul 通过grpc方式来调用consul中心的通过grpc协议的微服务
func NewConsulClient ¶
newConsulClient 连接consul服务
Types ¶
Click to show internal directories.
Click to hide internal directories.