utility

package
v0.0.0-...-2042d3b Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EcdsaPrivateKey

func EcdsaPrivateKey(key []byte) (*ecdsa.PrivateKey, error)

func IsFile

func IsFile(path string) bool

IsFile 判断是否为文件

func Max

func Max[T NumberComparable](numbers []T) T

func MilliStrToTime

func MilliStrToTime(s string) (time.Time, error)

func Min

func Min[T NumberComparable](numbers []T) T

func OrderBy

func OrderBy[T comparable, N NumberComparable](s []T, nFn func(t T) N, order int) []T

func VerifyCert

func VerifyCert(rootPEM, certByte, intermediaCertStr []byte) error

Types

type NumberComparable

type NumberComparable interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 |
		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
		~float32 | ~float64 |
		~string
}

Jump to

Keyboard shortcuts

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