util

package
v1.2.4-beta1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainField added in v1.2.2

func ContainField[T comparable](dst []T, src any, fieldName string) bool

func Contains

func Contains[T comparable](s []T, sep ...T) bool

func Equal added in v1.2.2

func Equal(src, dst any) bool

func EqualJson added in v1.2.2

func EqualJson(src, dst any) bool

func Float64 added in v1.2.2

func Float64(value float64, size int) float64

func GetCn added in v1.2.3

func GetCn(str string) (cn string)

GetCn get cn string unicode chinese range 4e00-9fa5,16 to 10: 19968 - 40869

func GetCnByRegexp added in v1.2.3

func GetCnByRegexp(str string) (cn string)

func HumpToLine

func HumpToLine(str string) string

HumpToLine Hump to underline, like json tag

func LineToHump

func LineToHump(str string) string

LineToHump Underscore to hump

func Md5

func Md5(b []byte) string

Md5 md5

func Remove

func Remove[T comparable](s []T, sep ...T) (res []T)

func RemoveDuplicate

func RemoveDuplicate[T comparable](s []T) []T

RemoveDuplicate remove duplicated slice or pointer slice

func RemoveIndex added in v1.2.3

func RemoveIndex[T comparable](s []T, i *int)

func Sha256 added in v1.2.1

func Sha256(b []byte) string

Sha256 sha256

Types

type Aes

type Aes struct {
	// contains filtered or unexported fields
}

func NewAes

func NewAes(key ...string) *Aes

func (*Aes) AesDe

func (as *Aes) AesDe(data string) string

func (*Aes) AesEn

func (as *Aes) AesEn(data string) string

func (*Aes) IsAes

func (as *Aes) IsAes(data string) bool

Jump to

Keyboard shortcuts

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