utils

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayN

func ArrayN(n int) []int

func FindRootInterface

func FindRootInterface(v reflect.Value) any

func MakeNew

func MakeNew[T any]() T

func MakeNewAny

func MakeNewAny(v any) any

func MakeValue

func MakeValue(elem reflect.Type) reflect.Value

Types

type SortShim

type SortShim struct {
	SwapFn func(i, j int)
	Length int
	LessFn func(i, j int) bool
}

func (*SortShim) Len

func (s *SortShim) Len() int

func (*SortShim) Less

func (s *SortShim) Less(i, j int) bool

func (*SortShim) Swap

func (s *SortShim) Swap(i, j int)

type SyncPool

type SyncPool[T any] interface {
	Get() T
	Put(T)
}

func NewPreAllocatedSyncPool added in v0.2.0

func NewPreAllocatedSyncPool[T any](newFunc func() any, size int) SyncPool[T]

func NewSyncPool added in v0.2.0

func NewSyncPool[T any](newFunc func() any) SyncPool[T]

Jump to

Keyboard shortcuts

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