utils

package
v0.0.0-...-e38dd13 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ALPHABET = "abcdefghijklmnopqrstuvwxyz"
View Source
const COLOR_FFFFFF = 16777215
View Source
const TIME_FORMAT = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(password string, hashedPassword string) error

func FormatTime

func FormatTime(t time.Time, tz *time.Location) string

func GetMD5

func GetMD5(str string, salt string, iteration int) string

func HashPassword

func HashPassword(password string) (string, error)

func HexColorToInt

func HexColorToInt[T int | int32 | int64](colorStr string) (T, error)

func IntToHexColor

func IntToHexColor[T int | int32 | int64](color T) string

func RandomCode

func RandomCode(len int) string

生成随机code

func RandomColorInt

func RandomColorInt() int32

func RandomEmail

func RandomEmail() string

func RandomInt

func RandomInt(min, max int64) int64

func RandomString

func RandomString(n int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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