Versions in this module Expand all Collapse all v0 v0.0.3 Feb 18, 2022 Changes in this version + const FormatDate + const FormatDateNum + const FormatDateShort + const FormatDateTime + const FormatDateTimeMs + const FormatDateTimeNum + const FormatDateTimeSec + const FormatDay + const FormatHour + const FormatMonth + const FormatTime + const FormatTimeMs + const FormatTimeSec + const FormatYear + func AddStr(args ...interface{}) string + func AddStrEx(split string, args ...interface{}) string + func AesDecrypt(cryted string, key string) string + func AesEncrypt(orig string, key string) string + func CamelCase(str string) string + func CamelCaseLowerFirst(str string) string + func CompareDifferenceStruct2SnakeKeyByJson(oldStruct interface{}, newStruct interface{}, update *map[string]interface{}) + func CompareDifferenceStructByJson(oldStruct interface{}, newStruct interface{}, update *map[string]interface{}) + func ComparePasswd(hashPasswd string, passwd string) error + func ComparePwd(str string, pwd string) bool + func CompressImage(filename string) error + func CompressImageSaveOriginal(filename string, before string) error + func CompressStrByZlib(s string) (*string, error) + func Contains(arr interface{}, item interface{}) bool + func ContainsUint(arr []uint, item uint) bool + func ContainsUintIndex(arr []uint, item uint) int + func ContainsUintThenRemove(arr []uint, item uint) []uint + func CreateDirIfNotExists(name string) string + func DeCompressStrByZlib(s string) string + func DecodeStrFromBase64(str string) string + func EncodeMD5(value string) string + func EncodeStr2Base64(str string) string + func FileExist(path string) bool + func GenPasswd(passwd string) string + func GenPwd(str string) string + func GetCpuPercent() float64 + func GetCryptId() string + func GetFormatDatetime(t time.Time) string + func GetIpRealLocation(ip string) string + func GetMapDataToFloat32(key string, data map[string]interface{}) float32 + func GetMapDataToFloat64(key string, data map[string]interface{}) float64 + func GetMapDataToInt(key string, data map[string]interface{}) int + func GetMapDataToInt64(key string, data map[string]interface{}) int64 + func GetMapDataToString(key string, data map[string]interface{}) string + func GetMemPercent() float64 + func GetNowStr() string + func GetTimeFormat(timeStr string) (format string) + func GetUUID() string + func GetWorkDir() string + func Json2Struct(str string, obj interface{}) + func JsonI2Struct(str interface{}, obj interface{}) + func NowlocalDatetimeStr() string + func PKCS7Padding(ciphertext []byte, blocksize int) []byte + func PKCS7UnPadding(origData []byte) []byte + func PathExists(path string) (bool, error) + func RSADecrypt(base64Data, privateBytes []byte) ([]byte, error) + func RSAEncrypt(data, publicBytes []byte) ([]byte, error) + func RSAGenKey(bits int) ([]byte, []byte, error) + func RSAReadKeyFromFile(filename string) []byte + func Sha1(data string) string + func Sha256_2Str(str string) string + func SnakeCase(str string) string + func StringUnquote(value string) string + func Struct2Json(obj interface{}) string + func Struct2StructByJson(struct1 interface{}, struct2 interface{}) + func UnZip(src, dst string) ([]string, error) + func Zip(src, dst string) error + type IpResp struct + City string + Province string + Status string + type LocalDate time.Time + func NowLocalDate() LocalDate + func NowLocalDatePtr() *LocalDate + func (l *LocalDate) Scan(v interface{}) error + func (l *LocalDate) UnmarshalJSON(data []byte) error + func (l LocalDate) MarshalJSON() ([]byte, error) + func (l LocalDate) Sub(t LocalDate) time.Duration + func (l LocalDate) Value() (driver.Value, error) + type LocalTime time.Time + func NowLocalTime() LocalTime + func NowLocalTimePtr() *LocalTime + func (l *LocalTime) Scan(v interface{}) error + func (l *LocalTime) UnmarshalJSON(data []byte) error + func (l LocalTime) MarshalJSON() ([]byte, error) + func (l LocalTime) Sub(t LocalTime) time.Duration + func (l LocalTime) Value() (driver.Value, error) + type LongDateTime time.Time + func (t *LongDateTime) Scan(v interface{}) error + func (t *LongDateTime) UnmarshalJSON(data []byte) (err error) + func (t LongDateTime) MarshalJSON() ([]byte, error) + func (t LongDateTime) String() string + func (t LongDateTime) Value() (driver.Value, error) + type UintSort []uint + func (s UintSort) Len() int + func (s UintSort) Less(i, j int) bool + func (s UintSort) Swap(i, j int)