bytes

package
v0.0.0-...-888bb8d Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[E any] struct {
	// contains filtered or unexported fields
}

func (*Map[E]) Delete

func (m *Map[E]) Delete(b []byte)

func (*Map[E]) ForEachReplace

func (m *Map[E]) ForEachReplace(f func(E) E)

func (*Map[E]) Get

func (m *Map[E]) Get(b []byte) E

func (*Map[E]) GetOk

func (m *Map[E]) GetOk(b []byte) (E, bool)

func (*Map[E]) Has

func (m *Map[E]) Has(b []byte) bool

func (*Map[E]) Len

func (m *Map[E]) Len() int

func (*Map[E]) Set

func (m *Map[E]) Set(b []byte, e E)

func (*Map[E]) Update

func (m *Map[E]) Update(m2 *Map[E])

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set is a container for unique byte slices.

func (*Set) Add

func (s *Set) Add(b []byte)

Add adds the slice b to the Set. The slice b is added based on its value at the time Add is called. Subsequent changes to b do not affect the Set. If b is already present in the Set, Add is a no-op.

func (*Set) Delete

func (s *Set) Delete(b []byte)

Delete removes b from the Set. If b is not present in the Set, Delete is a no-op.

func (*Set) Has

func (s *Set) Has(b []byte) bool

Has returns true if b is in the Set and false otherwise.

func (*Set) Len

func (s *Set) Len() int

Len returns the number of elements in the Set.

func (*Set) Update

func (s *Set) Update(s2 *Set)

Update ensures that all values in s2 are also in s1.

Jump to

Keyboard shortcuts

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