utils

package
v1.0.259 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Age added in v0.38.4

func Age(d time.Duration) string

func Contains added in v0.38.260

func Contains[T comparable](arr []T, item T) bool

func Deref added in v1.0.18

func Deref[T any](v *T, zeroVal ...T) T

func FreePort added in v1.0.152

func FreePort() int

func GenerateJSONMD5Hash added in v0.38.181

func GenerateJSONMD5Hash(obj interface{}) (string, error)

GenerateJSONMD5Hash marshals the object into JSON and generates its md5 hash

func MapKeys added in v1.0.52

func MapKeys[T any](m map[string]T) []string

func Ptr added in v0.38.335

func Ptr[T any](t T) *T

func SetDifference added in v0.38.160

func SetDifference[T comparable](a, b []T) []T

SetDifference returns the list of elements present in a but not present in b

func UUIDsToStrings added in v0.38.257

func UUIDsToStrings(in []uuid.UUID) []string

func UnfoldGlobs added in v1.0.123

func UnfoldGlobs(paths ...string) []string

Types

type NamedLock added in v1.0.118

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

func (*NamedLock) TryLock added in v1.0.118

func (n *NamedLock) TryLock(name string, timeout time.Duration) Unlocker

type Unlocker added in v1.0.118

type Unlocker interface {
	Release()
}

Jump to

Keyboard shortcuts

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