maptools

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone[K string | int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64, V int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64](m map[K]V) map[K]V

Clone map with primitive values

func Equal

func Equal[K string | int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64, V int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64](maps ...map[K]V) bool

Equal compare primitive values

func Merge

func Merge[K string | int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64, V int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64](args ...map[K]V) map[K]V

Merge maps with primitive values

func PickManyByProb

func PickManyByProb[T string](values map[T]float64, l int) ([]T, error)

PickManyByProb ...

func PickOneByProb

func PickOneByProb[T string](values map[T]float64) (T, error)

PickOneByProb ...

func PrepareMapToPickRandomValue

func PrepareMapToPickRandomValue[T string](values map[T]float64) map[T]float64

PrepareMapToPickRandomValue ...

func Unmarshal

func Unmarshal(in []byte) (map[string]interface{}, error)

Unmarshal []byte into map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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