custommaps

package
v1.37.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WithOrder

type WithOrder[T any] struct {
	// contains filtered or unexported fields
}

WithOrder is like map, but also retains information about the order the keys of the object where in when it was unmarshalled from JSON.

func (*WithOrder[T]) Get

func (b *WithOrder[T]) Get(key string) (*T, bool)

Get returns the value associated with the given key, and a boolean indicating whether the key was present.

func (*WithOrder[T]) OrderedKeys

func (b *WithOrder[T]) OrderedKeys() []string

Keys returns the keys of the map in the order they were unmarshalled from JSON.

func (*WithOrder[T]) OrderedValues

func (b *WithOrder[T]) OrderedValues() []*T

OrderedValues returns the values of the map in the order they were unmarshalled from JSON.

func (*WithOrder[T]) UnmarshalJSON

func (b *WithOrder[T]) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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