utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapSlice

func MapSlice[T, U any](in []T, mapper func(in T) U) []U

func Min

func Min[T constraints.Ordered](a, b T) T

func Must

func Must[T any](v T, err error) T

func Pointerize

func Pointerize[T any](v T) *T

Types

type MapEntry

type MapEntry[K constraints.Ordered, V any] struct {
	Key   K
	Value V
}

type OrderedMap

type OrderedMap[K constraints.Ordered, V any] []MapEntry[K, V]

func SortedMap

func SortedMap[K constraints.Ordered, V any](in map[K]V) OrderedMap[K, V]

Jump to

Keyboard shortcuts

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