Documentation ¶
Index ¶
- func AESCBCDecrypt(cryted string, key string) (string, error)
- func AESCBCEncrypt(orig string, key string) (string, error)
- func CommonPrefix(arr []string) string
- func CreatePath(filePath string) error
- func DeepCopy(dst, src interface{}) error
- func Diff(a map[string]interface{}, b map[string]interface{}) map[string]interface{}
- func DiffList(source, dest interface{}, cmp func(a, b interface{}) bool) (res []interface{})
- func DiffListToSlice(source, dest interface{}, cmp func(a, b interface{}) bool) (res interface{})
- func ExternalIP() (net.IP, error)
- func ExternalIPString() string
- func FindIndex(arr interface{}, item interface{}, cmp func(a, b interface{}) bool) (index int)
- func FormValueArray(key string, postForm url.Values) []string
- func GetTodayZeroPoint() int64
- func GetTodayZeroPointTime() time.Time
- func GetTyp(typeStr string) (typ reflect.Kind, err error)
- func GetVal(val string, typeStr string) (result interface{}, typ reflect.Kind, err error)
- func GetYesterdayZeroPoint() int64
- func InArray(val string, arr []string) (index int, exist bool)
- func IntNumberSet(ids []int) []int
- func IsExist(path string) bool
- func IsFileExists(path string) (bool, error)
- func Md5(s string) string
- func Md5Bytes(data []byte) string
- func Md5File(path string) string
- func Md5Str(val string) string
- func Now() int64
- func PKCS7Padding(ciphertext []byte, blocksize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func ParseAddr(tplType, addr string) (ip string, port, user, psw string)
- func ParseRedisAddr(addrOrigin string) (addr string)
- func RemoveDuplicatesAndEmpty(a []string) (ret []string)
- func ShortHash(longstr string, number int) string
- func String2Timestamp(str string) int64
- func StringInArray(needle string, haystack []string) bool
- func StringPkg(str string) (ok bool, depth int)
- func StringToInt64(s string) int64
- func Substr(str string, start int, length int) string
- func Timestamp2String(timestamp int) string
- func Timestamp2String64(timestamp int64) string
- type DSN
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommonPrefix ¶ added in v0.4.0
func CreatePath ¶ added in v0.2.0
func DiffList ¶ added in v0.2.0
func DiffList(source, dest interface{}, cmp func(a, b interface{}) bool) (res []interface{})
DiffList 求 source 和 dest 的 交/差集 此函数效率较低(O(n^2)),请在列表长度较小时使用
func DiffListToSlice ¶ added in v0.3.0
func DiffListToSlice(source, dest interface{}, cmp func(a, b interface{}) bool) (res interface{})
DiffListToSlice 求 source 和 dest 的 交/差集,返回类型和 source 相同
func ExternalIP ¶ added in v0.4.0
func ExternalIPString ¶ added in v0.4.0
func ExternalIPString() string
func FormValueArray ¶ added in v0.2.0
FormValueArray 从post form中获取数组参数
func GetTodayZeroPointTime ¶ added in v0.2.0
GetTodayZeroPointTime ..
func GetYesterdayZeroPoint ¶ added in v0.2.0
func GetYesterdayZeroPoint() int64
GetYesterdayZeroPoint ..
func PKCS7Padding ¶ added in v0.3.0
补码, len = 128||192||256 AES加密数据块分组长度必须为128bit(byte[16]),密钥长度可以是128bit(byte[16])、192bit(byte[24])、256bit(byte[32])中的任意一个。
func ParseRedisAddr ¶ added in v0.2.0
ParseRedisAddr ...
func RemoveDuplicatesAndEmpty ¶ added in v0.2.0
RemoveDuplicatesAndEmpty 去重
func String2Timestamp ¶ added in v0.2.0
String2Timestamp 会将当前时间转换为时间戳。
func StringInArray ¶ added in v0.2.0
func Timestamp2String ¶ added in v0.2.0
Timestamp2String 会格式化当前时间。
func Timestamp2String64 ¶ added in v0.2.0
Types ¶
Click to show internal directories.
Click to hide internal directories.