maps

package
v1.2.36 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set added in v1.2.26

func Set[M map[K]struct{}, K comparable](ks ...K) (m M)

Set implements a non-thread safe Set

func SplitN

func SplitN[M ~map[K]V, K comparable, V any](m M, n int) []M

SplitN slices s into submaps and returns a map of the submaps .

The count determines the number of submaps to return:

n > 0: at most n submaps; the last submaps will be the unsplit remainder.
n == 0: the result is nil (zero submaps)
n < 0: all submaps as n == len(s)

Edge cases for s and sep (for example, empty strings) are handled as described in the documentation for Split.

Types

This section is empty.

Jump to

Keyboard shortcuts

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