stdxgit.sr.ht/~pingoo/stdx/orderedmap Index | Files

package orderedmap

import "git.sr.ht/~pingoo/stdx/orderedmap"

Index

Types

type Element

type Element[K comparable, V any] struct {
	Key   K
	Value V
}

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

Map is wrapper for map that keeps it's order when deserializing from JSON Warning: it's highly inneficient and should only be used for configuration file or similar use cases

func (*Map[K, V]) Elems

func (m *Map[K, V]) Elems() []Element[K, V]

func (*Map[K, V]) UnmarshalJSON

func (m *Map[K, V]) UnmarshalJSON(data []byte) error

Source Files

orderedmap.go

Version
v0.0.0-20240218134121-094174641f6e (latest)
Published
Feb 18, 2024
Platform
linux/amd64
Imports
3 packages
Last checked
4 months ago

Tools for package owners.