Documentation ¶
Index ¶
- Constants
- func AppendSlice(slice []interface{}, args ...interface{}) []interface{}
- func DateTime2Date(DateTime interface{}, formats ...interface{}) (strDate string)
- func DateTimeStr() string
- func DateTimeStr2Unix(strDateTime string, timeFmt ...interface{}) (unixTime int64)
- func DateTimeUnix() int64
- func DateTimeUnix2Str(Timestamp interface{}, timeFmt ...interface{}) string
- func DateTimeUnix2Time(Timestamp interface{}) (t time.Time)
- func Decimal2Str(in interface{}) (out string)
- func ExcelTime2DateTime(v interface{}) (strDateTime string)
- func ExcelTime2Unix(v interface{}) (nUnixTime int64)
- func FloatIsEqual(f1, f2 float64) bool
- func GenRandStrMD5(length int) string
- func RegexpSubStr(strIn, strRegExp string) []string
- func Round(f float64, n int) float64
- func Str2Float(in string) (out float64)
- func Str2Int(in string) (out int)
- func Str2Int64(in string) (out int64)
- func StrIndexUtf8(strIn, strSub string) (RuneIdx int)
- func Utf8StrGetFront(strIn, strSub string, bInclude bool) (bFound bool, strOut string)
- func Utf8StrGetTail(strIn, strSub string, bInclude bool) (bFound bool, strOut string)
- type Config
- type SyncStack
Constants ¶
View Source
const MIN = 0.000001
Variables ¶
This section is empty.
Functions ¶
func AppendSlice ¶
func AppendSlice(slice []interface{}, args ...interface{}) []interface{}
func DateTime2Date ¶
func DateTime2Date(DateTime interface{}, formats ...interface{}) (strDate string)
将时间转日期(支持输入'2810-10-28 23:32:00'或 int32/64类型的时间戳) format 可输入字符串"/"或"-",不输入默认使用"-"格式化日期
func DateTimeStr2Unix ¶
DateTimeStr2Unix 时间字符串转时间戳(时间字符串格式:"2017-01-02 03:04:05") strFmt 明确指出时间字符串格式,"/"表示 "2017/01/06 03:04:05" 默认不传参数为"2017-01-02 03:04:05"格式
func DateTimeUnix2Str ¶
func DateTimeUnix2Str(Timestamp interface{}, timeFmt ...interface{}) string
DateTimeUnix2Str Unix时间戳转时间字符串(格式:"2017-01-02 03:04:05") Timestamp 时间戳可以是int64或string类型 strFmt 明确指出时间字符串格式,"/"表示 "2017/01/06 03:04:05" 默认不传参数为"2017-01-02 03:04:05"格式
func DateTimeUnix2Time ¶
将时间戳转为time.Time类型(Timestamp参数支持string和int64类型)
func ExcelTime2DateTime ¶
func ExcelTime2DateTime(v interface{}) (strDateTime string)
Excel存储的数值时间转为正常的时间字符串 支持参数类型: string、float32、float64、int、int32、int64
func ExcelTime2Unix ¶
func ExcelTime2Unix(v interface{}) (nUnixTime int64)
func GenRandStrMD5 ¶
func Utf8StrGetFront ¶
UTF-8字符串截取子串前面的字符串(bInclude true 表示包括子串,false 表示不包括)
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) SetDefault ¶
type SyncStack ¶
type SyncStack struct {
// contains filtered or unexported fields
}
func NewSyncStack ¶
func NewSyncStack() (ss *SyncStack)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.