ordered

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	Values map[string]interface{}
	Orders []string
}

Map ...

func NewMap

func NewMap() *Map

NewMap creates a new Map

func (*Map) Append

func (om *Map) Append(key string, value interface{})

Append appends a key value pair to the map

func (*Map) ByName

func (om *Map) ByName(name string) interface{}

ByName return a value ByName

func (*Map) ByOrder

func (om *Map) ByOrder(i int) interface{}

ByOrder returns a value ByOrder

func (*Map) Iter

func (om *Map) Iter() *MapIterator

Iter returns an iterator for the map

func (*Map) Len

func (om *Map) Len() int

Len returns the size of the map

func (*Map) MarshalJSON

func (om *Map) MarshalJSON() ([]byte, error)

MarshalJSON implements the json Marshaler interface

type MapIterator

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

MapIterator is an iterator for an Map

func (*MapIterator) Next

func (iter *MapIterator) Next() bool

Next returns true if there's a next element in the Map

func (*MapIterator) Value

func (iter *MapIterator) Value() (string, interface{})

Value returns the current element of the iterator

Jump to

Keyboard shortcuts

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