util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BcryptCheck

func BcryptCheck(password, hash string) bool

BcryptCheck 对比明文密码和数据库的哈希值

func BcryptHash

func BcryptHash(password string) string

BcryptHash 使用 bcrypt 对密码进行加密

func GetExecPath

func GetExecPath() (workDir string)

func MD5V

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

func ParseDuration

func ParseDuration(d string) (time.Duration, error)

func RandString

func RandString(n int) string

func SHA256

func SHA256(input string) string

func SliceColumn

func SliceColumn[T any](items []T, separator string, jsonPath ...string) (map[string][]T, error)

func SlicesDistinct

func SlicesDistinct[T comparable](slice []T) []T

func TypePtr

func TypePtr[T any](v T) *T

Types

This section is empty.

Jump to

Keyboard shortcuts

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