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

Interface IsZeroer

yaml.go:656–658  ·  yaml.go::IsZeroer

IsZeroer is used to check whether an object is zero to determine whether it should be omitted when marshaling with the omitempty flag. One notable implementation is time.Time.

Source from the content-addressed store, hash-verified

654// with the omitempty flag. One notable implementation
655// is time.Time.
656type IsZeroer interface {
657 IsZero() bool
658}
659
660func isZero(v reflect.Value) bool {
661 kind := v.Kind()

Callers 3

nodeMethod · 0.65
isZeroFunction · 0.65
unmarshalMethod · 0.65

Implementers 1

Nodeyaml.go

Calls

no outgoing calls

Tested by

no test coverage detected