readonly

package
v0.0.0-...-7e4dd95 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone[K comparable, V any](m map[K]V) map[K]V

maps.Clone doesn’t work correctly, see: https://github.com/golang/go/issues/53087

Types

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func CreateMap

func CreateMap[K comparable, V any](inner map[K]V) Map[K, V]

func CreateMapUnsafe

func CreateMapUnsafe[K comparable, V any](inner map[K]V) Map[K, V]

func EmptyMap

func EmptyMap[K comparable, V any]() Map[K, V]

func (Map[K, V]) Clone

func (m Map[K, V]) Clone() map[K]V

func (Map[K, V]) ContainsKey

func (m Map[K, V]) ContainsKey(key K) bool

func (Map[K, V]) Equals

func (m Map[K, V]) Equals(other Map[K, V], equal func(left, right V) bool) bool

func (Map[K, V]) ForEach

func (m Map[K, V]) ForEach(f func(k K, v V))

func (Map[K, V]) Get

func (m Map[K, V]) Get(key K) (V, bool)

func (Map[K, V]) IsEmpty

func (m Map[K, V]) IsEmpty() bool

func (Map[K, V]) Keys

func (m Map[K, V]) Keys() []K

func (Map[K, V]) Len

func (m Map[K, V]) Len() int

func (Map[K, V]) Values

func (m Map[K, V]) Values() []V

func (Map[K, V]) With

func (m Map[K, V]) With(key K, value V) Map[K, V]

func (Map[K, V]) Without

func (m Map[K, V]) Without(key K) Map[K, V]

Jump to

Keyboard shortcuts

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