maps

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

README

datatype

GoDoc Build Status Codecov Go Report Card Version

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map map[string]any

Map implements some quality of life extensions to a standard map[string]any

func New

func New() Map

New returns a fully initialized Map object.

func (Map) AsMapOfInterface

func (m Map) AsMapOfInterface() map[string]any

AsMapOfInterface returns the underlying map datastructure

func (Map) DeletePath

func (m Map) DeletePath(name string) error

DeletePath implements the path.Deleter interface

func (Map) GetBool

func (m Map) GetBool(name string) bool

GetBool returns a named option as a bool type.

func (Map) GetFloat

func (m Map) GetFloat(name string) float64

GetFloat returns a named option as a float type.

func (Map) GetInt

func (m Map) GetInt(name string) int

GetInt returns a named option as an int type.

func (Map) GetInt64

func (m Map) GetInt64(name string) int64

GetInt64 returns a named option as an int64 type.

func (Map) GetInterface

func (m Map) GetInterface(name string) any

GetInterface returns a named option without any conversion. You get what you get.

func (Map) GetKeys

func (m Map) GetKeys() []string

GetKeys returns all keys of the underlying map

func (Map) GetMap

func (m Map) GetMap(name string) Map

GetMap returns a named option as a maps.Map

func (Map) GetPath

func (m Map) GetPath(name string) (any, bool)

GetPath implements the path.Getter interface

func (Map) GetSliceOfFloat

func (m Map) GetSliceOfFloat(name string) []float64

GetSliceOfFloat returns a named option as a slice of float64 values

func (Map) GetSliceOfInt

func (m Map) GetSliceOfInt(name string) []int

GetSliceOfInt returns a named option as a slice of int values

func (Map) GetSliceOfMap

func (m Map) GetSliceOfMap(name string) []Map

GetSliceOfMap returns a named option as a slice of maps.Map objects.

func (Map) GetSliceOfString

func (m Map) GetSliceOfString(name string) []string

GetSliceOfString returns a named option as a slice of strings

func (Map) GetString

func (m Map) GetString(name string) string

GetString returns a named option as a string type.

func (Map) SetBool

func (m Map) SetBool(name string, value bool)

SetBool adds a boolean value into the map

func (Map) SetFloat

func (m Map) SetFloat(name string, value float64)

SetFloat adds an int value into the map

func (Map) SetInt

func (m Map) SetInt(name string, value int)

SetInt adds an int value into the map

func (Map) SetInt64

func (m Map) SetInt64(name string, value int64)

SetInt64 adds an int64 value into the map

func (Map) SetPath

func (m Map) SetPath(name string, value any) error

SetPath implements the path.Setter interface

func (Map) SetString

func (m Map) SetString(name string, value string)

SetString adds an int value into the map

Jump to

Keyboard shortcuts

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