intern

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interner

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

Interner is a simple threadsafe interner for []byte.

func NewInterner

func NewInterner(cap int) *Interner

func (*Interner) Intern

func (i *Interner) Intern(b []byte) []byte

Intern returns an interned []byte for the given slice. It assumes that the input []byte will not be modified after interning.

func (*Interner) InternStr

func (i *Interner) InternStr(s string) []byte

func (*Interner) Print

func (i *Interner) Print()

Jump to

Keyboard shortcuts

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