utils

package
v0.0.0-...-8fbb6bc Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderedMap

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

Provides a common ordered map.

func NewOrderedMap

func NewOrderedMap(items ...interface{}) *OrderedMap

func (*OrderedMap) Clear

func (om *OrderedMap) Clear()

Clear removes all items from the map.

func (*OrderedMap) Delete

func (om *OrderedMap) Delete(key interface{})

func (*OrderedMap) Get

func (om *OrderedMap) Get(key interface{}) (interface{}, bool)

func (*OrderedMap) Has

func (om *OrderedMap) Has(items ...interface{}) bool

Has looks for the existence of items passed. It returns false if nothing is passed. For multiple items it returns true only if all of the items exist.

func (*OrderedMap) IsEmpty

func (om *OrderedMap) IsEmpty() bool

IsEmpty reports whether the map is empty.

func (*OrderedMap) Pop

func (om *OrderedMap) Pop() (interface{}, interface{})

Pop deletes and return item from the key,value pair. The underlying map is modified. If map is empty, nil is returned.

func (*OrderedMap) Set

func (om *OrderedMap) Set(key interface{}, value interface{})

func (*OrderedMap) Size

func (om *OrderedMap) Size() int

Size returns the number of items in a map.

func (*OrderedMap) String

func (om *OrderedMap) String() string

Jump to

Keyboard shortcuts

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