commons

package
v0.0.0-...-f04d356 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEncryptPbkdf2

func CheckEncryptPbkdf2(str, encryptStr string) bool

CheckEncryptPbkdf2 验证字符串是否与加密串匹配

func EncryptPbkdf2

func EncryptPbkdf2(str string) (string, error)

EncryptPbkdf2 加密密码

func FormatFloat64

func FormatFloat64(v float64, dec int) (float64, error)

FormatFloat64 格式化float64保留指定位小数

func GetArrayIndex

func GetArrayIndex(values []string, value string) (int, error)

GetArrayIndex 获取指定字符串在数组中的位置

func IsNil

func IsNil(checkVal interface{}, nilVal string) string

IsNil checkVal为nil时返回nilVal,否则返回checkVal.(string)

func TernaryOperation

func TernaryOperation(check bool, trueVal, falseVal interface{}) interface{}

TernaryOperation 三元运算

Types

This section is empty.

Jump to

Keyboard shortcuts

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