yaml

package
v0.37.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(value interface{}) ([]byte, error)

func Unmarshal

func Unmarshal(in []byte, out interface{}) error

func UnmarshalMap

func UnmarshalMap(unmarshal func(interface{}) error) (map[string]interface{}, error)

UnmarshalMap allows unmarshaling into types that are safe to then be marshaled to json. By default yaml serializer converts these to map[interface{}]interface which cannot be serialised as json see https://github.com/go-yaml/yaml/issues/139 This is still required even with v3 because if any key isn't parsed as a string, e.g. you have a key named 1 or 2, then the bug is still triggered.

Types

This section is empty.

Jump to

Keyboard shortcuts

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