gomap

package
v0.0.0-...-ecc870c Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

package gomap provides a container.Mapper implementation backed by Go's native map for benchmark reference.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gomap

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

func New

func New[K KeyInterface, V any](capacity int) *Gomap[K, V]

func (*Gomap[K, V]) Delete

func (m *Gomap[K, V]) Delete(key K)

func (*Gomap[K, V]) Get

func (m *Gomap[K, V]) Get(key K) (v V, ok bool)

func (*Gomap[K, V]) Len

func (m *Gomap[K, V]) Len() int

func (*Gomap[K, V]) Reset

func (m *Gomap[K, V]) Reset()

func (*Gomap[K, V]) Set

func (m *Gomap[K, V]) Set(key K, value V)

func (*Gomap[K, V]) Visit

func (m *Gomap[K, V]) Visit(fn func(K, V) bool)

type KeyInterface

type KeyInterface interface {
	string | []byte
}

Jump to

Keyboard shortcuts

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