x

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package x provides miscellaneous helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneMapList

func CloneMapList[T comparable](src map[T]*list.List) map[T]*list.List

CloneMapList duplicates a map containing a list.List

func CloneMapListFn

func CloneMapListFn[K comparable, V any](src map[K]*list.List,
	fn func(v V) (V, bool)) map[K]*list.List

CloneMapListFn duplicates a map containing a list.List but allows the element's values to be cloned by a helper function

func MappedValueOr

func MappedValueOr[K comparable, V any](m map[K]V, key K, def V) (V, bool)

MappedValueOr returns a value of an entry or a default if not found

Types

This section is empty.

Jump to

Keyboard shortcuts

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