util

package
v0.0.0-...-f7aafea Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOptions

func ApplyOptions[T any](t *T, opts ...Option[T])

Types

type Hasher

type Hasher[Key cmp.Ordered] func(Key) uintptr

func GetHasher

func GetHasher[Key cmp.Ordered]() Hasher[Key]

setDefaultHasher sets the default hasher depending on the key type. Inlines hashing as anonymous functions for performance improvements, other options like returning an anonymous functions from another function turned out to not be as performant.

type Option

type Option[T any] interface {
	// contains filtered or unexported methods
}

type OptionFunc

type OptionFunc[T any] func(*T)

Jump to

Keyboard shortcuts

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