yaml

package
v1.39.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

Marshal is same as yaml.Marshal except it creates a `yaml.Encoder` with indent space 2 for encoding.

func MarshalWithSeparator added in v1.18.0

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

MarshalWithSeparator is same as Marshal except for slice or array types where each element is encoded individually and separated by "---".

func Unmarshal

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

Unmarshal is wrapper around yaml.Unmarshal

func UnmarshalStrict

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

UnmarshalStrict is like Unmarshal except that any fields that are found in the data that do not have corresponding struct members, or mapping keys that are duplicates, will result in an error. This is ensured by setting `KnownFields` true on `yaml.Decoder`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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