util

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinErr

func JoinErr(msg string, err error) error

func MergeMap

func MergeMap[T any](maps ...map[string]T) map[string]T

func Or

func Or(args ...string) string

func SetInterval

func SetInterval(ctx context.Context, fn func(), dur time.Duration, msgs ...string)

func SortedMapKeys

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

Types

type Empty

type Empty struct{}

type Set

type Set[T comparable] struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet[T comparable](items ...T) Set[T]

func (*Set[T]) Add

func (s *Set[T]) Add(v T) bool

func (*Set[T]) Has

func (s *Set[T]) Has(v T) bool

func (*Set[T]) List

func (s *Set[T]) List() []T

Jump to

Keyboard shortcuts

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