util

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HmacSha256

func HmacSha256(data []byte, secret string) string

func MaxFloat32 added in v0.0.7

func MaxFloat32(i []float32) float32

MaxFloat32 validates the input, compares the elements and returns the maximum element in an array/slice. It accepts []float32 It returns float32

func MaxFloat64 added in v0.0.7

func MaxFloat64(i []float64) float64

MaxFloat64 validates the input, compares the elements and returns the maximum element in an array/slice. It accepts []float64 It returns float64

func MaxInt added in v0.0.7

func MaxInt(i []int) int

MaxInt validates the input, compares the elements and returns the maximum element in an array/slice. It accepts []int It returns int

func MaxInt16 added in v0.0.7

func MaxInt16(i []int16) int16

MaxInt16 validates the input, compares the elements and returns the maximum element in an array/slice. It accepts []int16 It returns int16

func MaxInt32 added in v0.0.7

func MaxInt32(i []int32) int32

MaxInt32 validates the input, compares the elements and returns the maximum element in an array/slice. It accepts []int32 It returns int32

func MaxInt64 added in v0.0.7

func MaxInt64(i []int64) int64

MaxInt64 validates the input, compares the elements and returns the maximum element in an array/slice. It accepts []int64 It returns int64

func MaxInt8 added in v0.0.7

func MaxInt8(i []int8) int8

MaxInt8 validates the input, compares the elements and returns the maximum element in an array/slice. It accepts []int8 It returns int8

func MaxString added in v0.0.7

func MaxString(i []string) string

MaxString validates the input, compares the elements and returns the maximum element in an array/slice. It accepts []string It returns string

func MaybeRemoveQuotes added in v0.0.7

func MaybeRemoveQuotes(s string) string

func Md5

func Md5(str string) string

func StrategicGrowthNumber added in v0.0.6

func StrategicGrowthNumber(num, start, end int64) int64

StrategicGrowthNumber 获取策略增长数 计算指定周期内随机增长后的值 周期数num 随机区间start end 取随机区间中间数为基数,取区间中间一半为实际区间产生随机数 [ [x|x] ] 返回 基数*周期数+随机数 原理 区间随机数求和总是趋近于区间中间值

Types

This section is empty.

Jump to

Keyboard shortcuts

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