Documentation ¶
Index ¶
- Constants
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func ArrayIn(item interface{}, datas ...interface{}) bool
- func ArrayNotIn(item interface{}, datas ...interface{}) bool
- func CRC16(data []byte) []byte
- func Clone(src interface{}) interface{}
- func Date() string
- func DateTime() string
- func DeepClone(src interface{}) interface{}
- func FileExists(filepath string) bool
- func FloatFiexd(n float64, l int) float64
- func GetMonday(t time.Time) time.Time
- func MakeSN() string
- func MakeShortSN(n int64) string
- func MakeShortURL(longURL string) ([4]string, error)
- func Md5(a ...interface{}) string
- func MoneyFenToString(f int64) string
- func Sha1(a ...interface{}) string
- func Sha256(a ...interface{}) string
- func StructName(obj interface{}) string
- func VariableName(v interface{}) string
- func VersionToNumber(version string) int64
- func ZipCompress(files []*os.File, dest string) error
- func ZipDeCompress(zipFile, dest string) error
- type MoneyFen
Constants ¶
View Source
const ( FOMRAT_DATE = "2006-01-02" FORMAT_DATE_TIME = "2006-01-02 15:04:05" )
View Source
const ( VAL = 0x3FFFFFFF INDEX = 0x0000003D )
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
func Clone(src interface{}) interface{}
浅克隆,可以克隆任意数据类型,对指针类型子元素无法克隆 获取类型:如果类型是指针类型,需要使用Elem()获取对象实际类型 获取实际值:如果值是指针类型,需要使用Elem()获取实际数据 说白了,Elem()就是获取反射数据的实际类型和实际值
func ZipCompress ¶
压缩文件 files 文件数组,可以是不同dir下的文件或者文件夹 dest 压缩文件存放地址
Types ¶
Click to show internal directories.
Click to hide internal directories.