Documentation ¶
Index ¶
- func AsString(src interface{}) string
- func Base64Decode(src string) ([]byte, error)
- func Base64Encode(src []byte) string
- func BuildDir(absDir string) error
- func ByteToHex(data []byte) string
- func CheckFileIsExist(filename string) bool
- func CheckParam(params ...string) bool
- func Compress(files []*os.File, dest string) error
- func ConvertString(src string, tagCode string) string
- func ConvertToString(src string, srcCode string, tagCode string) string
- func Copy(dest []interface{}, src []interface{}) (result []interface{})
- func CopyFile(src, des string) error
- func DbcToSbc(str string) string
- func DecodeByte(data []byte, to interface{}) error
- func DeleteAbs(absDir string) error
- func DeleteArray(src []interface{}, index int) (result []interface{})
- func DeleteFile(absDir string) error
- func DeleteSlice(slice interface{}, index int) (interface{}, error)
- func DictSort(res []string) (str string)
- func EncodeByte(data interface{}) ([]byte, error)
- func FormatInt(list []int, seg string) string
- func FormatTime(tm time.Time, forStr string) string
- func GetClientIP(r *http.Request) (ip string)
- func GetCurrentDirectory() string
- func GetDay0(timestamp int64) time.Time
- func GetDayStr(tm time.Time) string
- func GetFuncName(f interface{}) string
- func GetGBK(src string) string
- func GetHour(timestamp int64) int
- func GetHour0(timestamp int64) time.Time
- func GetJSONObj(str string, out interface{}) error
- func GetJSONStr(obj interface{}, isFormat bool) string
- func GetLastDayCurrentTime(timestamp int64, offset int) time.Time
- func GetLocalIP() (ip string)
- func GetLocalSystemLang(isSimple bool) (locale string)
- func GetLocalTime(tm time.Time) time.Time
- func GetMd5String(s string) string
- func GetModelPath() string
- func GetMonth0(timestamp int64) time.Time
- func GetPathDirs(absDir string) (re []string)
- func GetPathFiles(absDir string) (re []string)
- func GetRandInt(min int, max int) int
- func GetRandomString(n int) string
- func GetRangeNum(digit int) int
- func GetRangeNumString(n int) string
- func GetSysTimeLayout() string
- func GetTimeStr(tm time.Time) string
- func GetTimeWeek(timestamp int64) int
- func GetTotalPageNum(pageSize, totalCount int) int
- func GetUtcDay0(tm time.Time) int64
- func GetUtcHour0(tm time.Time) int64
- func GetUtcMinute0(tm time.Time) int64
- func GetUtcTime(tm time.Time) int64
- func GetUtcWeek0(timestamp int64) int64
- func GetUtf8Len(str string) int
- func GetUtf8Str(str string) []rune
- func GetWeek0(timestamp int64) time.Time
- func GetWwwIP() (exip string)
- func Getenv(key string) string
- func HexToBye(hexStr string) []byte
- func IsHan(str string) bool
- func IsIDCard(cardNo string) bool
- func IsInternalType(t string) bool
- func IsKeywords(t string) bool
- func IsMail(username string) (isMail bool)
- func IsPhone(mobileNum string) bool
- func IsRunTesting() bool
- func IsUtf8(data []byte) bool
- func IsZip(zipPath string) bool
- func JSONDecode(obj interface{}) string
- func JSONEncode(str string, out interface{}) error
- func JSONToForm(r *http.Request)
- func Md5Encoder(src string) string
- func MinimumInt(rest []int) int
- func MinimumString(rest []string) string
- func MoveFile(from, to string) error
- func ReadFile(fname string) (src []string)
- func ReadFileEx(fname string) []byte
- func RemoveMark(text string) string
- func Reverse(s string) string
- func SaveToFile(fname string, src []string, isClear bool) bool
- func Sha1Encrypt(str string) string
- func StrToTime(tStr, format string, timeZone *time.Location) time.Time
- func StringTimetoUnix(timestr string) int64
- func Substr(str string, start, length int) string
- func TimerByHour(f func())
- func UnicodeEmojiCode(s string) string
- func UnicodeEmojiDecode(s string) string
- func UniqueID() string
- func UnixToTime(timestamp int64) time.Time
- func Unzip(archive, target string) error
- func WriteFile(fname string, src []string, isClear bool) bool
- func WriteFileEx(fname string, src []byte, isClear bool) bool
- type RawBytes
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToString ¶
ConvertToString 字符集转换
func DeleteArray ¶
func DeleteArray(src []interface{}, index int) (result []interface{})
DeleteArray 删除数组
func DeleteSlice ¶
DeleteSlice 删除切片index
func GetJSONObj ¶
GetJSONObj string convert to obj
func GetJSONStr ¶
GetJSONStr obj to json string
func GetLastDayCurrentTime ¶
GetLastDayCurrentTime 获取offset天的现在时间:注意时区
func GetLocalSystemLang ¶
GetLocalSystemLang 获取本地语言 (like:zh_CN.UTF-8)(simple:zh)
func JSONEncode ¶
JSONEncode string convert to obj
func StringTimetoUnix ¶
StringTimetoUnix 给定字符串时间转换成本地时间戳
Types ¶
Click to show internal directories.
Click to hide internal directories.