Documentation ¶
Index ¶
- func AsString(src interface{}) string
- func Base64Decode(src []byte) ([]byte, error)
- func Base64Encode(src []byte) string
- func BuildDir(absDir string) error
- func ByteToHex(data []byte) string
- 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 DbcToSbc(str string) string
- func DecodeByte(data []byte, to interface{}) error
- func DeleteArray(src []interface{}, index int) (result []interface{})
- func DeleteSlice(slice interface{}, index int) (interface{}, error)
- func DictSort(res []string) (str string)
- func EncodeByte(data interface{}) ([]byte, error)
- func FileIsExist(filename string) bool
- func FormatInt(list []int, seg string) string
- func FormatTime(tm time.Time, forStr string) string
- func GenerateRangeNum(digit int) int
- func GenerateRangeNumString(n int) string
- func GetClientIP(r *http.Request) (ip string)
- func GetDay0(timestamp int64) time.Time
- func GetDayStr(tm time.Time) string
- func GetEnv(key string) 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{})
- 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 GetMonth0(timestamp int64) time.Time
- func GetPathDir(absDir string) (re []string)
- func GetRandInt(min int, max int) int
- func GetRandomString(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(now time.Time, timeZone *time.Location) 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 HexToBye(hexStr string) []byte
- 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 IsZip(zipPath string) bool
- func JSONDecode(obj interface{}) string
- func JSONEncode(str string, out interface{})
- func JSONToForm(r *http.Request)
- func Md5Encoder(src string) string
- func MinimumInt(rest []int) int
- func MinimumString(rest []string) string
- func ReadFile(fileName string) (src []string)
- func Reverse(s string) string
- 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
- type LocalTime
- func (p LocalTime) MarshalBinary() ([]byte, error)
- func (p LocalTime) MarshalJSON() ([]byte, error)
- func (p LocalTime) MarshalText() ([]byte, error)
- func (p LocalTime) String() string
- func (p *LocalTime) UnmarshalBinary(data []byte) error
- func (p *LocalTime) UnmarshalJSON(data []byte) (err error)
- func (p *LocalTime) UnmarshalText(data []byte) (err error)
- 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 GenerateRangeNumString ¶
GenerateRangeNumString 生成随机数字字符串
func GetJSONStr ¶
GetJSONStr obj to json string
func GetLastDayCurrentTime ¶
GetLastDayCurrentTime 获取offset天的现在时间:注意时区
func GetLocalSystemLang ¶
GetLocalSystemLang 获取本地语言 (like:zh_CN.UTF-8)(simple:zh)
func GetUtcDay0 ¶
GetUtcDay0 获取offset 0点时间
func StringTimeToUnix ¶
StringTimeToUnix 给定字符串时间转换成本地时间戳
Types ¶
type LocalTime ¶ added in v0.1.2
自定义时间格式
func NewOftenTime ¶ added in v0.1.2
func NewOftenTime() LocalTime
func (LocalTime) MarshalBinary ¶ added in v0.1.2
func (LocalTime) MarshalJSON ¶ added in v0.1.2
func (LocalTime) MarshalText ¶ added in v0.1.2
func (*LocalTime) UnmarshalBinary ¶ added in v0.1.2
func (*LocalTime) UnmarshalJSON ¶ added in v0.1.2
func (*LocalTime) UnmarshalText ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.