utils

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decimal added in v0.0.2

func Decimal(value float64, spec int) float64

Decimal 浮点数保留小数位数转换

func DecimalString added in v0.0.2

func DecimalString(value float64, spec int) string

DecimalString 小数位数转换成保留位数字符串

func LoadConfigFileViper

func LoadConfigFileViper(path string) (*viper.Viper, error)

LoadConfigFileViper 从配置文件加载配置到viper

func Sha256PasswordEncrypt

func Sha256PasswordEncrypt(password string) (string, string, error)

Sha256PasswordEncrypt 对密码进行sha256加密

func Sha256PasswordValidate

func Sha256PasswordValidate(password, salt, hash string) bool

Sha256PasswordValidate 对密码进行sha256加密,并与已加密的密码进行比较

Types

This section is empty.

Jump to

Keyboard shortcuts

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