Documentation ¶
Index ¶
- func Base64Decode(value string) (string, error)
- func Common()
- func DeepCopy(dst, src interface{}) error
- func DeepCopyByJSON(dst, src interface{}) error
- func DefaultString(value, defaultValue string) string
- func GenCustomTimestamp() string
- func GenRandomNumString(l int) string
- func GenRandomSixDigital() string
- func GenRandomString(l int) string
- func IsDigitPresent(number, d int) bool
- func IsDigitPresentUint64(number uint64, d uint64) bool
- func LocalCurrent() time.Time
- func NewDateFromString(value, layout string) (time.Time, error)
- func NewDateFromYearMonthDay(year, month, day string) (time.Time, error)
- func NewDateUtc8FromYearMonthDay(year, month, day string) (time.Time, error)
- func OrderBizIDGen() string
- func OrderOriIDRestore(bizid string) string
- func OrderShortBizIDGen() string
- func OrderShortBizIDGenUint64() uint64
- func ParseBytesToInt(b []byte) int
- func ParseBytesToInt32(b []byte) int32
- func ParseBytesToInt64(b []byte) int64
- func ParseBytesToUint(b []byte) uint
- func ParseBytesToUint32(b []byte) uint32
- func ParseBytesToUint64(b []byte) uint64
- func ParseInt32ToBytes(num int32) []byte
- func ParseInt32ToStr(value int32) string
- func ParseInt64ToBytes(num int64) []byte
- func ParseInt64ToStr(value int64) string
- func ParseIntToBytes(num int) []byte
- func ParseIntToStr(value int) string
- func ParseStrToInt(value string, defaultValue int) int
- func ParseStrToInt32(value string, defaultValue int32) int32
- func ParseStrToInt64(value string, defaultValue int64) int64
- func ParseStrToUint(value string, defaultValue uint) uint
- func ParseStrToUint32(value string, defaultValue uint32) uint32
- func ParseStrToUint64(value string, defaultValue uint64) uint64
- func ParseTimeNano(value string, defaultValue time.Time) time.Time
- func ParseUint32ToBytes(num uint32) []byte
- func ParseUint32ToStr(value uint32) string
- func ParseUint64ToBytes(num uint64) []byte
- func ParseUint64ToStr(value uint64) string
- func ParseUintToBytes(num uint) []byte
- func ParseUintToStr(value uint) string
- func SplitPhone(phone string) (string, string, apperr.Error)
- func Time0(time1 time.Time) time.Time
- func TimeFormatDate(tm time.Time) string
- func TimeFormatDateTime(tm time.Time) string
- func TimeFormatWithLayout(tm time.Time, layout string) string
- func UUIDGenFromString(value string) uuid.UUID
- func UUIDHexGenFromString(value string) string
- func UUIDParseFromString(value string) (uuid.UUID, error)
- func UUIDStringGen() string
- func UUIDStringGenFromString(value string) string
- func UUIDV1HexGen() string
- func UUIDV1StringGen() string
- func UUIDV4HexGen() string
- func UUIDV4StringGen() string
- func Utc0Current() time.Time
- func Utc0Time(tm time.Time) time.Time
- func Utc8Current() time.Time
- func Utc8Day(days int) time.Time
- func Utc8Day0(time1 time.Time) time.Time
- func Utc8DayString(days int) string
- func Utc8DuctionDays(time1, time2 time.Time) int
- func Utc8Lastday() time.Time
- func Utc8LastdayString() string
- func Utc8Time(tm time.Time) time.Time
- func Utc8Today() time.Time
- func Utc8TodayString() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultString ¶
DefaultString DefaultString
func GenRandomNumString ¶
GenRandomNumString GenRandomNumString
func GenRandomSixDigital ¶
func GenRandomSixDigital() string
GenRandomSixDigital GenRandomSixDigital
func IsDigitPresentUint64 ¶
IsDigitPresentUint64 IsDigitPresentUint64
func NewDateFromString ¶
NewDateFromString NewDateFromString layout 2006-01-02
func NewDateFromYearMonthDay ¶
NewDateFromYearMonthDay NewDateFromYearMonthDay
func NewDateUtc8FromYearMonthDay ¶
NewDateUtc8FromYearMonthDay NewUtc8DateFromYearMonthDay
func OrderOriIDRestore ¶
OrderOriIDRestore OrderOriIDRestore order-2019080812282674502
func OrderShortBizIDGen ¶
func OrderShortBizIDGen() string
OrderShortBizIDGen BIZIDGen 1907301746-54-029
func OrderShortBizIDGenUint64 ¶
func OrderShortBizIDGenUint64() uint64
OrderShortBizIDGenUint64 OrderShortBizIDGenUint64
func ParseStrToInt32 ¶
ParseStrToInt32 ParseStrToInt32
func ParseStrToInt64 ¶
ParseStrToInt64 ParseInt64
func ParseStrToUint ¶
ParseStrToUint ParseUint
func ParseStrToUint32 ¶
ParseStrToUint32 ParseUint
func ParseStrToUint64 ¶
ParseStrToUint64 ParseUint64
func ParseTimeNano ¶
ParseTimeNano ParseTimeNano
func ParseUint32ToStr ¶
ParseUint32ToStr ParseUint32ToStr
func ParseUint64ToStr ¶
ParseUint64ToStr ParseUint64ToStr
func SplitPhone ¶
SplitPhone SplitPhone +8615618297195",
func TimeFormatWithLayout ¶
TimeFormatWithLayout TimeFormatWithLayout
func UUIDGenFromString ¶
UUIDGenFromString 使用字符串生成固定的 UUID
func UUIDHexGenFromString ¶
UUIDHexGenFromString 使用字符串生成固定的 UUID
func UUIDParseFromString ¶
UUIDParseFromString UUIDParseFromString
func UUIDStringGen ¶
func UUIDStringGen() string
UUIDStringGen UUIDStringGen b9be9a09-7117-4bdb-9c6d-737269c86480
func UUIDStringGenFromString ¶
UUIDStringGenFromString 使用字符串生成固定的 UUID
func UUIDV1HexGen ¶
func UUIDV1HexGen() string
UUIDV1HexGen UUIDV1HexGen 5106b5e58ee44f74a5d49e779dcf7f57
func UUIDV1StringGen ¶
func UUIDV1StringGen() string
UUIDV1StringGen UUIDV1StringGen b9be9a09-7117-4bdb-9c6d-737269c86480
func UUIDV4HexGen ¶
func UUIDV4HexGen() string
UUIDV4HexGen UUIDV4HexGen 5106b5e58ee44f74a5d49e779dcf7f57
func UUIDV4StringGen ¶
func UUIDV4StringGen() string
UUIDV4StringGen UUIDV4StringGen b9be9a09-7117-4bdb-9c6d-737269c86480
func Utc8DayString ¶
Utc8DayString 当前服务器时间的东八区昨天日期 服务器时区不重要,统一换算为东八区 再向前取一天
func Utc8DuctionDays ¶
Utc8DuctionDays 一个日期和另一个日期相差多少天 要都在东八区算 两边都要先算成 0点,因为两边都算整天的
func Utc8Lastday ¶
Utc8Lastday 当前服务器时间的东八区昨天日期 服务器时区不重要,统一换算为东八区 再向前取一天
func Utc8LastdayString ¶
func Utc8LastdayString() string
Utc8LastdayString 当前服务器时间的东八区昨天日期 服务器时区不重要,统一换算为东八区 再向前取一天
Types ¶
This section is empty.