MCPcopy
hub / github.com/go-yaml/yaml / KnownFields

Method KnownFields

yaml.go:110–112  ·  view source on GitHub ↗

KnownFields ensures that the keys in decoded mappings to exist as fields in the struct being decoded into.

(enable bool)

Source from the content-addressed store, hash-verified

108// KnownFields ensures that the keys in decoded mappings to
109// exist as fields in the struct being decoded into.
110func (dec *Decoder) KnownFields(enable bool) {
111 dec.knownFields = enable
112}
113
114// Decode reads the next YAML-encoded value from its input
115// and stores it in the value pointed to by v.

Callers 1

Calls

no outgoing calls

Tested by 1