Documentation ¶
Index ¶
- Variables
- func AddSecondToTime(second int64) (timestamp int64, Time time.Time, timeStr string)
- func AesDecrypt(encrypted []byte, key []byte) ([]byte, error)
- func AesDecryptBase64(str, key string) (string, error)
- func AesEncrypt(origData []byte, key []byte) ([]byte, error)
- func AesEncryptBase64(str, key string) (string, error)
- func BeforeDayTime(day int) (timestamp int64, Time time.Time, timeStr string)
- func CheckEmailRule(email string) bool
- func CheckIdNumRule(idNum string) bool
- func CheckIdNumRuleSimple(idNum string) bool
- func CheckMobileNumRule(mobile string) bool
- func CheckStringLength(str string, length int) bool
- func CreateOrderNo() (sn string)
- func DiyTimeFmtStr(format string, timestamps ...int64) string
- func Float32ToString(f float64) string
- func Float64ToString(f float64) string
- func Int64ToInt(i64 int64) int
- func Int64ToString(i64 int64) string
- func Md5(str string) string
- func NowDataTime() time.Time
- func NowDataTimeFmtStr() string
- func NowDataTimeStr() string
- func NowTime() (timestamp int64, Time time.Time, timeStr string)
- func NowTimeSplit() (ymd, hms string)
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) ([]byte, error)
- func RandString() string
- func Round(val float64, num int32) (res float64, exact bool)
- func Sha1(str string) string
- func SpellReadNum(str string) (slice []string, err error)
- func StrLengthCutAndSplitJoint(str string, cutLength int, splitJointStr ...string) string
- func StrToInt64(str string) (int64, error)
- func TimeSplit(t time.Time) (ymd, hms string)
- func TimeStrToTime(str string) (timestamp int64, Time time.Time)
- func TimestampToTime(timestamp int64) (Time time.Time, timeStr string)
- func TodayDataTimeEnd() (timestamp int64, Time time.Time, timeStr string)
- func TodayDataTimeStart() (timestamp int64, Time time.Time, timeStr string)
- func UrlDecode(str string) (url string)
- func UrlEncode(url string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TimeLayout string = "2006-01-02 15:04:05" TimeLayoutYMD string = "2006-01-02" TimeLayoutHMS string = "15:04:05" )
Functions ¶
func AddSecondToTime ¶ added in v0.0.3
AddSecondToTime 在当前时间戳的基础上加上秒数,重新生成时间日期
func AesDecrypt ¶ added in v0.0.6
AesDecrypt 实现解密
func AesDecryptBase64 ¶ added in v0.0.6
AesDecryptBase64 base64解密
func AesEncrypt ¶ added in v0.0.6
AesEncrypt 实现加密
func AesEncryptBase64 ¶ added in v0.0.6
AesEncryptBase64 加密为base64
func BeforeDayTime ¶ added in v0.0.17
BeforeDayTime N天前的时间
func CheckIdNumRule ¶ added in v0.0.2
CheckIdNumRule 验证身份证号码的合法性
func CheckIdNumRuleSimple ¶ added in v0.0.19
CheckIdNumRuleSimple 简单校验身份证号码的位数+组成字符
func CheckMobileNumRule ¶ added in v0.0.2
CheckMobileNumRule 验证手机号码
func CheckStringLength ¶ added in v0.0.14
CheckStringLength 判断字符串长度是否在规定范围内
func DiyTimeFmtStr ¶ added in v0.1.2
DiyTimeFmtStr Diy时间格式
func Float32ToString ¶ added in v0.0.2
Float32ToString float32转string
func Float64ToString ¶ added in v0.0.2
Float64ToString float64转string
func Int64ToString ¶ added in v0.0.2
Int64ToString int64转string
func NowDataTime ¶ added in v0.0.2
func NowDataTimeFmtStr ¶ added in v0.0.2
func NowDataTimeFmtStr() string
func NowDataTimeStr ¶ added in v0.0.2
func NowDataTimeStr() string
func PKCS7Padding ¶ added in v0.0.6
PKCS7Padding PKCS7 填充模式
func PKCS7UnPadding ¶ added in v0.0.6
PKCS7UnPadding 填充的反向操作,删除填充字符串
func RandString ¶ added in v0.0.7
func RandString() string
func SpellReadNum ¶ added in v0.0.18
SpellReadNum 拼读数
func StrLengthCutAndSplitJoint ¶ added in v0.0.13
StrLengthCutAndSplitJoint 字符串长度截取并拼接处理
func TimeStrToTime ¶ added in v0.0.2
TimeStrToTime 将时间字符串转为时间戳和time.Time(例如:2021-08-08 08:08:08)
func TimestampToTime ¶ added in v0.0.4
TimestampToTime 时间戳转日期格式
func TodayDataTimeEnd ¶ added in v0.0.2
TodayDataTimeEnd 今日23:59:59时间
func TodayDataTimeStart ¶ added in v0.0.2
TodayDataTimeStart 今日凌晨时间
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.