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

Method emitScalar

encode.go:414–426  ·  view source on GitHub ↗
(value, anchor, tag string, style yaml_scalar_style_t, head, line, foot, tail []byte)

Source from the content-addressed store, hash-verified

412}
413
414func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t, head, line, foot, tail []byte) {
415 // TODO Kill this function. Replace all initialize calls by their underlining Go literals.
416 implicit := tag == ""
417 if !implicit {
418 tag = longTag(tag)
419 }
420 e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style))
421 e.event.head_comment = head
422 e.event.line_comment = line
423 e.event.foot_comment = foot
424 e.event.tail_comment = tail
425 e.emit()
426}
427
428func (e *encoder) nodev(in reflect.Value) {
429 e.node(in.Interface().(*Node), "")

Callers 8

stringvMethod · 0.95
boolvMethod · 0.95
intvMethod · 0.95
uintvMethod · 0.95
timevMethod · 0.95
floatvMethod · 0.95
nilvMethod · 0.95
nodeMethod · 0.95

Calls 4

mustMethod · 0.95
emitMethod · 0.95
longTagFunction · 0.85

Tested by

no test coverage detected