utilsHelper

package
v0.0.0-...-d4ad7b1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TimeFormat = "2006-01-02"
View Source
const Time_Format = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func CheckPasswordFormat

func CheckPasswordFormat(password string) bool

验证密码格式(密码可包含数字、英文、!@#$&*.,字符,长度6-20)

param password
return bool

func CheckTelFormat

func CheckTelFormat(tel string) bool

验证手机号码格式

 param tel
	retuen bool

func GenValidateCode

func GenValidateCode(width int) string

生成验证码

param width 验证码位数

func GetTimestamp

func GetTimestamp() int64

获取当前时间戳

func StringToDTime

func StringToDTime(strTime string) time.Time

时间yyyy-MM-dd转time

func StringToSTime

func StringToSTime(strTime string) time.Time

时间yyyy-MM-dd HH:mm:ss转time

func TimestampToSTime

func TimestampToSTime(timestamp int64) string

时间戳转时间yyyy-MM-dd HH:mm:ss

func TimestampToTime

func TimestampToTime(timestamp int64) time.Time

时间戳转time

Types

This section is empty.

Jump to

Keyboard shortcuts

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