utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Now = time.Now()

Functions

func ContainsInt64

func ContainsInt64(collection []int64, element int64) bool

func ContainsString

func ContainsString(collection []string, element string) bool

func JoinInt64

func JoinInt64(arr []int64, sep string) string

func Md5SumString

func Md5SumString(input string) string

func RandomInt

func RandomInt(min int, max int) int

func RandomInt32

func RandomInt32(min int32, max int32) int32

func RandomInt64

func RandomInt64(min int64, max int64) int64

func RandomString

func RandomString(length int) string

func SplitToSlice

func SplitToSlice[T any](input, sep string, fn func(item string) T) []T

SplitToSlice 分割字符串,去掉空格并遍历

func SplitTrim

func SplitTrim(input, sep string) []string

SplitTrim 分割字符串并去掉空格

func ToInt

func ToInt(v interface{}) int

func ToInt64

func ToInt64(v interface{}) int64

func ToString

func ToString(v interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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