Documentation
ΒΆ
Overview ΒΆ
The unique package provides facilities for canonicalizing ("interning") comparable values.
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type Handle ΒΆ
type Handle[T comparable] struct { // contains filtered or unexported fields }
Handle is a globally unique identity for some value of type T.
Two handles compare equal exactly if the two values used to create the handles would have also compared equal. The comparison of two handles is trivial and typically much more efficient than comparing the values used to create them.
func Make ΒΆ
func Make[T comparable](value T) Handle[T]
Make returns a globally unique handle for a value of type T. Handles are equal if and only if the values used to produce them are equal. Make is safe for concurrent use by multiple goroutines.
Click to show internal directories.
Click to hide internal directories.