utils

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEmpty

func CheckEmpty(value string) bool

CheckEmpty 检测是否为空 空则返回真

func CheckMaxLength

func CheckMaxLength(value string, maxLength int, fieldName string)

CheckMaxLength 检验字段fieldName的值value 的长度

func CheckMaxListSize

func CheckMaxListSize(value string, maxSize int, fieldName string)

CheckMaxListSize 检验字段fieldName的值value的最大列表长度

func CheckMaxValue

func CheckMaxValue(value string, maxValue int, fieldName string)

CheckMaxValue 检测最大值

func CheckMinFloatValue

func CheckMinFloatValue(value string, minVal float64, fieldName string)

检测最小值

func CheckMinValue

func CheckMinValue(value string, minVal int, fieldName string)

CheckMinValue 检测最小值

func CheckNotNull

func CheckNotNull(value, fieldName string)

CheckNotNull 检测非空

func CheckNumber

func CheckNumber(value, fieldName string)

检测是否为数字

func GetUUID

func GetUUID() string

func Hmac

func Hmac(key, data string) string

func Md5

func Md5(data string) string

func NowTime

func NowTime() *time.Time

func Round

func Round(f float64, n int) float64

func SortParamters

func SortParamters(params url.Values) []string

SortParamters 参数排序返回排序的KEY 通过KEY循环取出

func StrFirstToUpper

func StrFirstToUpper(str string, step string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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