Versions in this module Expand all Collapse all v0 v0.1.3 Sep 4, 2023 Changes in this version + const CBC + const CFB + const CTR + const ECB + const GB18030 + const GB2312 + const GBK + const SecondsPerDay + const SecondsPerHour + const SecondsPerMinute + const TimeMilliTemplate + const TimeTemplate + const UTF8 + var Leaps = []int + var Pyears = []int + func AbPathByCaller() string + func AnyToArr(data interface{}) []interface + func AnyToFloat64(data interface{}) float64 + func AnyToInt(data interface{}) int + func AnyToInt64(data interface{}) int64 + func AnyToJson(data interface{}) (string, error) + func AnyToJsonB(data interface{}) ([]byte, error) + func AnyToMap(data interface{}) map[string]interface + func AnyToString(i interface{}) string + func AnyToStrings(data interface{}) []string + func BIG5To(dstCharset string, src string) (dst string, err error) + func Base64Decode(str string) (string, error) + func Base64Encode(str string) string + func Base64UrlDecode(str string) (string, error) + func Base64UrlEncode(str string) string + func BeginDayUnix() int64 + func BitToByte(b []uint8) []byte + func BoolToByte(b bool) []byte + func ByteToBinaryString(data byte) (str string) + func ByteToBit(b []byte) []uint8 + func ByteToBool(b []byte) bool + func ByteToFloat32(b []byte) float32 + func ByteToFloat64(b []byte) float64 + func ByteToGBK(strBuf []byte) []byte + func ByteToInt(b []byte) int + func ByteToInt64(b []byte) int64 + func ByteToStr(b []byte) string + func CleaningStr(str string) string + func CompressDirZip(src, outFile string) error + func CompressFiles(files []string, dest string) error + func ConvertByte2String(byte []byte, charset Charset) string + func ConvertGBKToStr(gbkStr string) string + func ConvertStrToGBK(str string) string + func CopySlice(s []interface{}) []interface + func CopySliceInt(s []int) []int + func CopySliceInt64(s []int64) []int64 + func CopySliceStr(s []string) []string + func Date2Timestamp(date string) int64 + func DayAgo(i int) int64 + func DayAgoDate(i int) string + func DayAgoDateYMD(i int) string + func DayDiff(beginDay string, endDay string) int + func DeCompressTAR(tarFile, dest string) error + func DeCompressZIP(zipFile, dest string) error + func Deadline(timestamp int64) string + func DecodeByte(b []byte) (interface{}, error) + func DecompressionZipFile(src, dest string) error + func DeepCopy(dst, src interface{}) error + func DeepEqual(a, b interface{}) bool + func EncodeByte(v interface{}) []byte + func EndDayUnix() int64 + func Exists(path string) bool + func FileExists(name string) bool + func FileMd5(path string) (string, error) + func FileMd5sum(fileName string) string + func Float32ToByte(f float32) []byte + func Float32ToUint32(f float32) uint32 + func Float64ToByte(f float64) []byte + func Float64ToUint64(f float64) uint64 + func GB18030To(dstCharset string, src string) (dst string, err error) + func GB2312To(dstCharset string, src string) (dst string, err error) + func GDKTo(dstCharset string, src string) (dst string, err error) + func Get16MD5Encode(data string) string + func GetAllFile(pathname string) ([]string, error) + func GetChineseMonthDay(date string) (rmonth, rday int64) + func GetMD5Encode(data string) string + func GetNowPath() string + func GetPointClassHTML(htmlStr, label, val string) ([]string, error) + func GetPointHTML(htmlStr, label, attr, val string) ([]string, error) + func GetPointIDHTML(htmlStr, label, val string) ([]string, error) + func GetWD() string + func GzipCompress(src []byte) []byte + func GzipDecompress(src []byte) []byte + func HZGB2312To(dstCharset string, src string) (dst string, err error) + func HexToInt(s string) int + func HexToInt64(s string) int64 + func HmacMD5(str, key string) string + func HmacSHA1(str, key string) string + func HmacSHA256(str, key string) string + func HmacSHA512(str, key string) string + func HourAgo(i int) int64 + func ID() int64 + func ID64() (int64, error) + func IDMd5() string + func IDShort() int64 + func IDStr() string + func IF(condition bool, a, b interface{}) interface + func Int64ToByte(i int64) []byte + func Int64ToHex(i int64) string + func Int64ToStr(i int64) string + func IntToByte(i int) []byte + func IntToHex(i int) string + func IsContainStr(items []string, item string) bool + func IsDir(path string) bool + func IsElementStr(listData []string, element string) bool + func IsFile(path string) bool + func IsHaveKey(data map[string]interface{}, key string) bool + func IsInSlice(s []interface{}, v interface{}) bool + func IsJson(str string) bool + func IsLeap(year int) bool + func IsPic(suffix string) bool + func IsToday(timestamp int64) string + func IsTodayList(timestamp int64) string + func IsUtf8(buf []byte) bool + func JsonFind(jsonStr, find string) (interface{}, error) + func JsonFind2Arr(jsonStr, find string) ([]interface{}, error) + func JsonFind2Json(jsonStr, find string) (string, error) + func JsonFind2Map(jsonStr, find string) (map[string]interface{}, error) + func JsonToMap(str string) (map[string]interface{}, error) + func LatestDate(date int) []string + func Map2Slice(data interface{}) []interface + func MapCopy(data map[string]interface{}) (copy map[string]interface{}) + func MapMergeCopy(src ...map[string]interface{}) (copy map[string]interface{}) + func MapStrToAny(m map[string]string) map[string]interface + func MapToJson(m interface{}) (string, error) + func Md5Uppercase(str string) string + func MinuteAgo(i int) int64 + func NowDate() string + func NowDateHMS() string + func NowDateLayout(layout string) string + func NowDateYMD() string + func NowToEnd() (int64, error) + func OutJsonFile(data interface{}, fileName string) error + func P2E() + func PBKDF2(str, salt []byte, iterations, keySize int) []byte + func PanicToError(fn func()) (err error) + func PathExists(path string) + func RandomIntCaptcha(captchaLen int) string + func RandomString(list []string) string + func RegFindAll(regStr, rest string) [][]string + func RegFindAllTxt(regStr, rest string) (dataList []string) + func RemoveRepeatedElementInt64(arr []int64) (newArr []int64) + func ReplaceAllToOne(str string, from []string, to string) string + func ResolveTime(seconds int) (day int, hour int, minute int, sy int) + func ResolveTimeStr(seconds int) string + func SearchBytesIndex(bSrc []byte, b byte) int + func SizeFormat(size int64) string + func Slice2Map(slice interface{}) map[string]interface + func SliceCopy(data []interface{}) []interface + func SliceTool() *sliceTool + func StrDeleteSpace(str string) string + func StrDuplicates(a []string) []string + func StrLen(str string) int + func StrNumToFloat32(str string) float32 + func StrNumToFloat64(str string) float64 + func StrNumToInt(str string) int + func StrNumToInt32(str string) int32 + func StrNumToInt64(str string) int64 + func StrToByte(s string) []byte + func StructToMap(obj interface{}) map[string]interface + func StructToMapV2(obj interface{}, hasValue bool) (map[string]interface{}, error) + func StructToMapV3(obj interface{}) map[string]interface + func TickerRun(t time.Duration, runFirst bool, f func()) + func Timestamp() string + func Timestamp2Date(timestamp int64) string + func Timestamp2Week(timestamp int64) string + func Timestamp2WeekXinQi(timestamp int64) string + func ToBIG5(srcCharset string, src string) (dst string, err error) + func ToGB18030(srcCharset string, src string) (dst string, err error) + func ToGB2312(srcCharset string, src string) (dst string, err error) + func ToGDK(srcCharset string, src string) (dst string, err error) + func ToHZGB2312(srcCharset string, src string) (dst string, err error) + func ToUTF16(srcCharset string, src string) (dst string, err error) + func ToUTF8(srcCharset string, src string) (dst string, err error) + func URIStr(url string) string + func UTF16To(dstCharset string, src string) (dst string, err error) + func UTF8To(dstCharset string, src string) (dst string, err error) + func Uint8ToStr(bs []uint8) string + func UnescapeUnicode(raw []byte) ([]byte, error) + func UnicodeDec(raw string) string + func UnicodeDecByte(raw []byte) []byte + type AES interface + Decrypt func(str, key []byte) ([]byte, error) + Encrypt func(str, key []byte) ([]byte, error) + func NewAES(typeName string, arg ...[]byte) AES + type Bar struct + func (bar *Bar) Finish() + func (bar *Bar) NewOption(start, total int64) + func (bar *Bar) NewOptionWithGraph(start, total int64, graph string) + func (bar *Bar) Play(cur int64) + type Charset string + type Cron struct + C *cron.Cron + func NewCron() *Cron + func (c *Cron) AddAtDayWhatTime(f func(), i int) + func (c *Cron) AddAtFriday(f func()) + func (c *Cron) AddAtHours(f func(), i int) + func (c *Cron) AddAtMinute(f func(), i int) + func (c *Cron) AddAtMonday(f func()) + func (c *Cron) AddAtSaturday(f func()) + func (c *Cron) AddAtSunday(f func()) + func (c *Cron) AddAtThursday(f func()) + func (c *Cron) AddAtTuesday(f func()) + func (c *Cron) AddAtWednesday(f func()) + func (c *Cron) Run() + type DES interface + Decrypt func(str, key []byte) ([]byte, error) + Encrypt func(str, key []byte) ([]byte, error) + func NewDES(typeName string, arg ...[]byte) DES + type GDMap struct + func NewGDMap() *GDMap + func (m *GDMap) Add(key string, value interface{}) *GDMap + func (m *GDMap) AddMap(data map[string]interface{}) *GDMap + func (m *GDMap) CheckValue(value interface{}) bool + func (m *GDMap) Del(key string) *GDMap + func (m *GDMap) Get(key string) interface{} + func (m *GDMap) KeyList() []string + func (m *GDMap) Len() int + func (m *GDMap) Range(f func(k string, v interface{})) *GDMap + func (m *GDMap) RangeAt(f func(id int, k string, v interface{})) *GDMap + func (m *GDMap) Reverse() + type GDMaper interface + Add func(key string, value interface{}) *GDMap + AddMap func(data map[string]interface{}) *GDMap + CheckValue func(value interface{}) bool + Del func(key string) *GDMap + Get func(key string) interface{} + KeyList func() []string + Len func() int + Range func(f func(k string, v interface{})) *GDMap + RangeAt func(f func(id int, k string, v interface{})) *GDMap + Reverse func() + type IdWorker struct + func (idw *IdWorker) InitIdWorker(workerId, datacenterId int64) error + func (idw *IdWorker) NextId() (int64, error) + type JWT struct + Claims jwt.MapClaims + Expire int + Secret string + func NewJWT(secret string, expire int) *JWT + func (j *JWT) AddClaims(k string, v interface{}) *JWT + func (j *JWT) Get(k string) interface{} + func (j *JWT) GetBool(k string) bool + func (j *JWT) GetFloat64(k string) float64 + func (j *JWT) GetInt(k string) int + func (j *JWT) GetInt64(k string) int64 + func (j *JWT) GetString(k string) string + func (j *JWT) IsExpire() bool + func (j *JWT) ParseToken(token string) error + func (j *JWT) Print() + func (j *JWT) Token() (string, error) + type Paginator struct + MaxPages int + PerPageNums int + Request *http.Request + func NewPaginator(req *http.Request, per int, nums interface{}) *Paginator + func (p *Paginator) HasNext() bool + func (p *Paginator) HasPages() bool + func (p *Paginator) HasPrev() bool + func (p *Paginator) IsActive(page int) bool + func (p *Paginator) Nums() int64 + func (p *Paginator) Offset() int + func (p *Paginator) Page() int + func (p *Paginator) PageLink(page int) string + func (p *Paginator) PageLinkFirst() string + func (p *Paginator) PageLinkLast() string + func (p *Paginator) PageLinkNext() string + func (p *Paginator) PageLinkPrev() string + func (p *Paginator) PageNums() int + func (p *Paginator) Pages() []int + func (p *Paginator) SetNums(nums interface{}) + type Set map[string]struct + func (s Set) Add(key string) + func (s Set) Delete(key string) + func (s Set) Has(key string) bool + type Stack struct + func New() *Stack + func (s *Stack) Pop() + func (s *Stack) Push(data interface{}) + func (s *Stack) String() string