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

Function yaml_emitter_process_anchor

emitterc.go:1053–1065  ·  view source on GitHub ↗

Write an anchor.

(emitter *yaml_emitter_t)

Source from the content-addressed store, hash-verified

1051
1052// Write an anchor.
1053func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool {
1054 if emitter.anchor_data.anchor == nil {
1055 return true
1056 }
1057 c := []byte{'&'}
1058 if emitter.anchor_data.alias {
1059 c[0] = '*'
1060 }
1061 if !yaml_emitter_write_indicator(emitter, c, true, false, false) {
1062 return false
1063 }
1064 return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor)
1065}
1066
1067// Write a tag.
1068func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool {

Calls 2

Tested by

no test coverage detected