utils

package
v0.0.0-...-ab943b8 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToInt32

func BytesToInt32(b []byte) int32

BytesToInt32 字节数组转换成整型

func CheckCode

func CheckCode(code uint32) bool

CheckCode 检查短信验证码

func CheckFileIsExist

func CheckFileIsExist(filename string) bool

CheckFileIsExist 检查文件是否存在

func CheckMail

func CheckMail(mail string) bool

CheckMail 检查邮箱格式

func CheckNickName

func CheckNickName(nickname string) bool

CheckNickName 检查昵称格式

func CheckPassword

func CheckPassword(password string) bool

CheckPassword 检查密码格式

func CheckPhone

func CheckPhone(phone string) bool

CheckPhone 检查手机号格式

func CreateUID

func CreateUID() uint32

CreateUID 创建6位数字的ID

func DiffDays

func DiffDays(t1 time.Time, t2 time.Time) int

相差天数 (t2 - t1)

func Int

func Int(str string) int

转 int 输出

func Int32ToBytes

func Int32ToBytes(n int32) []byte

Int32ToBytes 整型转换成字节数组

func MD5

func MD5(str string) string

MD5 MD5加密(32位)

func Pow

func Pow(x, n int) int

Pow 次方算法

func PrintBuffer

func PrintBuffer(buffer []byte) string

PrintBuffer 打印字节流

func ShowName

func ShowName(uid uint32, username string, phone string, nickname string) string

ShowName 显示名字

Types

This section is empty.

Jump to

Keyboard shortcuts

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