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

Method timev

encode.go:385–389  ·  view source on GitHub ↗
(tag string, in reflect.Value)

Source from the content-addressed store, hash-verified

383}
384
385func (e *encoder) timev(tag string, in reflect.Value) {
386 t := in.Interface().(time.Time)
387 s := t.Format(time.RFC3339Nano)
388 e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil)
389}
390
391func (e *encoder) floatv(tag string, in reflect.Value) {
392 // Issue #352: When formatting, use the precision of the underlying value

Callers 1

marshalMethod · 0.95

Calls 1

emitScalarMethod · 0.95

Tested by

no test coverage detected