utils

package
v0.0.0-...-0a681d7 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BcryptMake

func BcryptMake(pwd []byte) string

func BcryptMakeCheck

func BcryptMakeCheck(pwd []byte, hashedPwd string) bool

func GenerateRandomString

func GenerateRandomString(length int) (string, error)

generateRandomString 生成指定长度的随机字符串 使用base64编码来增加可读性,但请注意这会增加字符串的长度

func MD5

func MD5(str []byte, b ...byte) string

func PathExists

func PathExists(path string) (bool, error)

func RandString

func RandString(len int) string

func ValidateMobile

func ValidateMobile(fl validator.FieldLevel) bool

ValidateMobile 校验手机号

Types

This section is empty.

Jump to

Keyboard shortcuts

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