Documentation ¶
Index ¶
- func Date() string
- func Datetime() string
- func ISO8601() string
- func JsonToMarshal(data interface{}) string
- func Md5(str []byte, b ...byte) string
- func RFC822() string
- func RandInt(n int) int
- func RandString(n int) string
- func SetTimeZone(zone string) error
- func Sha3(str []byte, b ...byte) string
- func StrToTime(str string, layout string) time.Time
- func TimeToStr(t time.Time, layout string) string
- func Timestamp() int64
- func TimestampMicro() int64
- func TimestampMilli() int64
- func TimestampMilliStr() string
- func TimestampNano() int64
- func TimestampStr() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Datetime ¶
func Datetime() string
Datetime returns current datetime in string like "2006-01-02 15:04:05".
func ISO8601 ¶
func ISO8601() string
ISO8601 returns current datetime in ISO8601 format like "2006-01-02T15:04:05-07:00".
func JsonToMarshal ¶
func JsonToMarshal(data interface{}) string
func RFC822 ¶
func RFC822() string
RFC822 returns current datetime in RFC822 format like "Mon, 02 Jan 06 15:04 MST".
func RandString ¶
RandString 生成随机字符串 值可能为: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ 0123456789
func TimestampMicro ¶
func TimestampMicro() int64
TimestampMicro returns the timestamp in microseconds(微秒).
func TimestampMilli ¶
func TimestampMilli() int64
TimestampMilli returns the timestamp in milliseconds(毫秒).
func TimestampNano ¶
func TimestampNano() int64
TimestampNano returns the timestamp in nanoseconds(纳秒).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.