util

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RandInt = 1 << iota
	RandStringUpper
	RandStringLower
	RandStringSpecial
)

strType 000, 第一位代表int, 第二位代表 string_upper, 第三位代表 string_lower

Variables

This section is empty.

Functions

func Fail

func Fail(args ...interface{}) (int, interface{})

func FileExists

func FileExists(name string) bool

FileExists 文件是否存在

func GetFilePath

func GetFilePath(file string) (string, error)

GetFilePath 获取目录文件 1.优先找工作目录 2. 请求执行目录

func Md5

func Md5(str string) string

Md5 md5 加密

func Ok

func Ok(data interface{}) (int, interface{})

func RandStr

func RandStr(args ...interface{}) string

RandStr @Description: 生成随机字符串 @param args args[0] length, args[1]strtype @return string

func Result

func Result(args ...interface{}) (int, interface{})

func Sha1

func Sha1(str string) string

Sha1 sha1 加密

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL