dict

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotDict = errors.New(`parsed object is not map[string]interface{}`)
)

Functions

func JsonToMap

func JsonToMap(data []byte) (m map[string]interface{}, err error)

Types

type MapDict

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

func NewMapDict

func NewMapDict() *MapDict

func (*MapDict) Data

func (d *MapDict) Data() map[string]interface{}

func (*MapDict) Each

func (d *MapDict) Each(fn func(interface{}, string))

func (*MapDict) Filter

func (d *MapDict) Filter(fn func(interface{}, string) bool) *MapDict

func (*MapDict) Forget

func (d *MapDict) Forget(k interface{})

func (*MapDict) Get

func (d *MapDict) Get(k interface{}) interface{}

func (*MapDict) IsEmpty

func (d *MapDict) IsEmpty() bool

func (*MapDict) Json

func (d *MapDict) Json() string

func (*MapDict) Keys

func (d *MapDict) Keys() (keys []string)

func (*MapDict) Len

func (d *MapDict) Len() int

func (*MapDict) ParseJsonString

func (d *MapDict) ParseJsonString(data []byte) (err error)

func (*MapDict) Set

func (d *MapDict) Set(k interface{}, v interface{})

func (*MapDict) SetData

func (d *MapDict) SetData(data map[string]interface{})

func (*MapDict) String

func (d *MapDict) String() string

func (*MapDict) Values

func (d *MapDict) Values() (values []interface{})

Jump to

Keyboard shortcuts

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