intern

package standard library
go1.20.10 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package intern lets you make smaller comparable values by boxing a larger comparable value (such as a 16 byte string header) down into a globally unique 8 byte pointer.

The globally unique pointers are garbage collected with weak references and finalizers. This package hides that.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

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

A Value pointer is the handle to an underlying comparable value. See func Get for how Value pointers may be used.

func Get