Documentation ¶
Index ¶
- func CleanPath(p string) string
- func DecodeMap(encoded []byte) (map[interface{}]interface{}, error)
- func DecodeString(source string) (string, error)
- func DeepCopy(dst, src interface{}) error
- func ECBDecrypt(crypted, key []byte) ([]byte, error)
- func ECBEncrypt(origData, key []byte) ([]byte, error)
- func EncodeMap(obj map[interface{}]interface{}) ([]byte, error)
- func EncodeString(source string) string
- func Exist(filename string) bool
- func GBKToUTF8(src string) string
- func GetCurrentDirectory() string
- func GetExeFileName() (filename string)
- func GetExeFilePath() (execpath string)
- func GetHashSeed() int64
- func GetMacAddrs() string
- func GetMd5String(s string, upper bool, half bool) string
- func GetMd5String_V2(s string) string
- func GetRandString(length int) string
- func GetUUID() string
- func HashNonEncryption(s string) uint32
- func Int2String(val int) string
- func Int642String(val int64) string
- func IsLinux() bool
- func IsPathExisted(path string) (bool, error)
- func IsWindows() bool
- func Json2Pb(strjson string, pb proto.Message) error
- func NSToTime(ns int64) (time.Time, error)
- func NewInt64_v1() int64
- func NewInt64_v3() (id int64)
- func NewOnly_v1() (onlyid snowflake.ID, err error)
- func NewOnly_v2() (id uint64, err error)
- func NewOnly_v3() string
- func NewString_v1() string
- func NewString_v3() string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func Pb2Json(pb proto.Message, strjson string) (err error)
- func RandByUInt32(n int64) (result uint32)
- func RandByUInt64(n int64) (result int64)
- func RandInt32(n int32) (result int32)
- func RandInt32FromZero(n int32) (result int32)
- func RandInt64(n int64) (result int64)
- func SizeVal(data interface{}) int
- func SliceByte2String(b []byte) string
- func SliceBytesLength(data []byte) int
- func StrArray2Str(src []string) string
- func String2Bytes(val string) []byte
- func String2Int(val string) (int, error)
- func String2Int64(val string) (int64, error)
- func String2Slicebyte(s string) []byte
- func String2UInt64(val string) (uint64, error)
- func TripleEcbDesDecrypt(crypted, key []byte) ([]byte, error)
- func TripleEcbDesEncrypt(origData, key []byte) ([]byte, error)
- func UInt642String(val uint64) string
- func UTF8ToGB18030(src string) string
- func UTF8ToGBK(src string) string
- func ZlibCompress(src []byte) []byte
- func ZlibUnCompress(src []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanPath ¶
CleanPath is the URL version of path.Clean, it returns a canonical URL path for p, eliminating . and .. elements.
The following rules are applied iteratively until no further processing can be done:
- Replace multiple slashes with a single slash.
- Eliminate each . path name element (the current directory).
- Eliminate each inner .. path name element (the parent directory) along with the non-.. element that precedes it.
- Eliminate .. elements that begin a rooted path: that is, replace "/.." by "/" at the beginning of a path.
If the result of this process is an empty string, "/" is returned
func DecodeString ¶
DecodeString deencode string use base64 StdEncoding
func EncodeString ¶
EncodeString encode string use base64 StdEncoding
func GetCurrentDirectory ¶
func GetCurrentDirectory() string
func GetExeFileName ¶
func GetExeFileName() (filename string)
func GetExeFilePath ¶
func GetExeFilePath() (execpath string)
func GetMd5String ¶
create 32bit md5 string
func GetMd5String_V2 ¶
GetMd5String compute the md5 sum as string
func GetRandString ¶
GetRandString returns randominzed string with given length
func IsPathExisted ¶
func NewInt64_v1 ¶
func NewInt64_v1() int64
func NewInt64_v3 ¶
func NewInt64_v3() (id int64)
func NewOnly_v1 ¶
func NewOnly_v2 ¶
func NewString_v1 ¶
func NewString_v1() string
func NewString_v3 ¶
func NewString_v3() string
func RandByUInt32 ¶
create rand unsign 32 bit by single number
func RandByUInt64 ¶
create rand unsign 64 bit by single number
func RandInt32FromZero ¶
rand int32 number space: [0,n) min: 1 max: n
func SliceByte2String ¶
func SliceBytesLength ¶
func String2Int64 ¶
String2Int64 convert string to int64
func String2Slicebyte ¶
func String2UInt64 ¶
String2UInt64 convert string to uint64
func TripleEcbDesDecrypt ¶
[golang ECB 3DES Decrypt]
func TripleEcbDesEncrypt ¶
[golang ECB 3DES Encrypt]
func ZlibCompress ¶
func ZlibUnCompress ¶
Types ¶
This section is empty.