Documentation
¶
Overview ¶
Package xyaml contains utility functions for parsing YAML.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNullElements ¶ added in v0.8.8
CheckNullElements finds if the node has any null values in positions which decode into a nil pointer.
Such positions are elements of a sequence decoded into a slice of pointers, and values of a mapping decoded into a map with pointer values, e.g. `[]*T` and `map[string]*T`:
list: - null - field: value
Code iterating over such a slice or map rarely expects nil entries, so it is safer to reject them while decoding than to panic later on.
A null value for a struct field is allowed, as it is a conventional way to unset the field.
All offending positions are reported, joined into a single error.
func CheckUnknownKeys ¶ added in v0.8.3
CheckUnknownKeys finds if the node has any extra keys which do not exist in t.
func UnmarshalStrict ¶
UnmarshalStrict decodes YAML document validating that there are no extra fields found.
Types ¶
This section is empty.