function

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeLayout string = "2006-01-02 15:04:05"

Functions

func AddSecondToTime added in v0.0.3

func AddSecondToTime(second int64) (timestamp int64, Time time.Time, timeStr string)

AddSecondToTime 在当前时间戳的基础上加上秒数,重新生成时间日期

func CheckEmailRule added in v0.0.2

func CheckEmailRule(email string) bool

func CheckIdNumRule added in v0.0.2

func CheckIdNumRule(idNum string) bool

func CheckMobileNumRule added in v0.0.2

func CheckMobileNumRule(mobile string) bool

func Float32ToString added in v0.0.2

func Float32ToString(f float64) string

Float32ToString float32转string

func Float64ToString added in v0.0.2

func Float64ToString(f float64) string

Float64ToString float64转string

func Int64ToInt added in v0.0.2

func Int64ToInt(i64 int64) int

Int64ToInt int64转int

func Int64ToString added in v0.0.2

func Int64ToString(i64 int64) string

Int64ToString int64转string

func Md5 added in v0.0.2

func Md5(str string) string

func NowDataTime added in v0.0.2

func NowDataTime() time.Time

func NowDataTimeFmtStr added in v0.0.2

func NowDataTimeFmtStr() string

func NowDataTimeStr added in v0.0.2

func NowDataTimeStr() string

func NowTime added in v0.0.4

func NowTime() (timestamp int64, Time time.Time, timeStr string)

NowTime 当前时间

func Sha1 added in v0.0.2

func Sha1(str string) string

func StrToInt64 added in v0.0.2

func StrToInt64(str string) (int64, error)

StrToInt64 string转int6

func TimeStrToTime added in v0.0.2

func TimeStrToTime(str string) (timestamp int64, Time time.Time)

TimeStrToTime 将时间字符串转为时间戳和time.Time(例如:2021-08-08 08:08:08)

func TimestampToTime added in v0.0.4

func TimestampToTime(timestamp int64) (Time time.Time, timeStr string)

TimestampToTime 时间戳转日期格式

func TodayDataTimeEnd added in v0.0.2

func TodayDataTimeEnd() (timestamp int64, Time time.Time, timeStr string)

TodayDataTimeEnd 今日23:59:59时间

func TodayDataTimeStart added in v0.0.2

func TodayDataTimeStart() (timestamp int64, Time time.Time, timeStr string)

TodayDataTimeStart 今日凌晨时间

func UrlDecode added in v0.0.2

func UrlDecode(str string) (url string)

UrlDecode url_decode

func UrlEncode added in v0.0.2

func UrlEncode(url string) string

UrlEncode url_encode

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL