array

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidListMap = errors.New("ListMap must be a list of strings or a map of lists of strings")

ErrInvalidListMap indicates that the specified YAML is invalid for this type

View Source
var ErrInvalidMap = errors.New("Map must be a single string or an array of key value pairs")

ErrInvalidMap indicates that an Map is either invalid or being filled by invalid YAML

Functions

This section is empty.

Types

type ListMap

type ListMap map[string][]*yaml.Node

ListMap is a YAML list which gets read into a map

Example:

- one - two - red:

  • three
  • four

func NewListMap added in v0.1.5

func NewListMap() ListMap

NewListMap returns an empty ListMap

func (ListMap) MarshalYAML

func (am ListMap) MarshalYAML() (out interface{}, err error)

MarshalYAML is a custom marshaler to handle this type

func (*ListMap) UnmarshalYAML

func (am *ListMap) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML is a custom unmarshaler to handle this type

type Map

type Map map[string]*yaml.Node

Map is a YAML list or single value that gets read in as a map

Examples: component: system.devel

component:

  • system.devel
  • docs: programming.tools

func NewMap added in v0.1.5

func NewMap() Map

NewMap creates an empty Map

func (Map) MarshalYAML

func (am Map) MarshalYAML() (out interface{}, err error)

MarshalYAML handles custom marshaling for Map

func (*Map) UnmarshalYAML

func (am *Map) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML handles custom unmarshaling for Map

Jump to

Keyboard shortcuts

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