Documentation
¶
Overview ¶
Package strictyaml decodes YAML configuration that must hold exactly one document with no unknown keys, so a misspelled key or a stray document fails instead of being ignored.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrEmpty = errors.New("the file holds no YAML document")
ErrEmpty reports data with no YAML document holding content, such as an empty file, one of only comments, or a bare separator. A loader that accepts an empty file ignores it.
Functions ¶
func Decode ¶
Decode decodes the one document in data with content into out, failing on a key out has no field for or on a second document with content. It skips documents that hold nothing, such as a bare separator or a comment-only header, and returns ErrEmpty when no other document remains.
func HasTopLevelKey ¶
HasTopLevelKey reports whether the document Decode would pick has one of keys at its top level. Data that is empty, malformed, or holds more than one document with content has none.
Types ¶
This section is empty.