std

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyMap

func CopyMap[K comparable, V any](m map[K]V) map[K]V

func FindMapElements

func FindMapElements[K comparable, V any](keys []K, m map[K]V) (res []V)

func FullMergeMaps

func FullMergeMaps(mapA map[string]any, mapB map[string]any) (res map[string]any)

func GetValues

func GetValues[K comparable, V any](m map[K]V) (res []V)

func MergeMapsOfArrays

func MergeMapsOfArrays(mapA map[string]interface{}, mapB map[string]interface{}) (res map[string]interface{})

func MergeSlicesUnique

func MergeSlicesUnique[T string | int](ss ...[]T) (res []T)

func Min added in v0.0.5

func Min[T number](a T, b T) T

func RightMergeMaps

func RightMergeMaps[T comparable, V any](left map[T]V, right map[T]V) (res map[T]V)

Types

type Item

type Item struct {
	Key          string
	LastModified time.Time
	Index        int // The index of the item in the heap.
}

type Pair

type Pair[T, V any] struct {
	First  T
	Second V
}

func MapToPairs

func MapToPairs[T comparable, V any](m map[T]V) (res []Pair[T, V])

type PriorityQueue

type PriorityQueue struct {
	// contains filtered or unexported fields
}

func NewPriorityQueue

func NewPriorityQueue(itemCap int) PriorityQueue

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() interface{}

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x interface{})

Jump to

Keyboard shortcuts

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