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

Function yaml_emitter_process_line_comment

emitterc.go:1147–1161  ·  view source on GitHub ↗

Write an line comment.

(emitter *yaml_emitter_t)

Source from the content-addressed store, hash-verified

1145
1146// Write an line comment.
1147func yaml_emitter_process_line_comment(emitter *yaml_emitter_t) bool {
1148 if len(emitter.line_comment) == 0 {
1149 return true
1150 }
1151 if !emitter.whitespace {
1152 if !put(emitter, ' ') {
1153 return false
1154 }
1155 }
1156 if !yaml_emitter_write_comment(emitter, emitter.line_comment) {
1157 return false
1158 }
1159 emitter.line_comment = emitter.line_comment[:0]
1160 return true
1161}
1162
1163// Write a foot comment.
1164func yaml_emitter_process_foot_comment(emitter *yaml_emitter_t) bool {

Calls 2

putFunction · 0.85

Tested by

no test coverage detected