util

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParallelKeys

func ParallelKeys[K comparable, V any](maxp int, p map[K]V, fn func(k K))

func ParallelVals

func ParallelVals[K comparable, V any](maxp int, p map[K]V, fn func(k V))

func ToFloat32

func ToFloat32(s string) (float32, error)

func ToFloat64

func ToFloat64(s string) (float64, error)

Types

type Container added in v1.0.25

type Container interface {
	Capacity() int
	ResetLen(n int)
}

type Pool added in v1.0.25

type Pool[T Container] struct {
	// contains filtered or unexported fields
}

func NewPool added in v1.0.25

func NewPool[T Container](fn func(capacity int) T) *Pool[T]

func (*Pool[T]) Get added in v1.0.25

func (p *Pool[T]) Get(length, capacity int) T

func (*Pool[T]) Put added in v1.0.25

func (p *Pool[T]) Put(s T)

Jump to

Keyboard shortcuts

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