Write a head comment.
(emitter *yaml_emitter_t)
| 1116 | |
| 1117 | // Write a head comment. |
| 1118 | func yaml_emitter_process_head_comment(emitter *yaml_emitter_t) bool { |
| 1119 | if len(emitter.tail_comment) > 0 { |
| 1120 | if !yaml_emitter_write_indent(emitter) { |
| 1121 | return false |
| 1122 | } |
| 1123 | if !yaml_emitter_write_comment(emitter, emitter.tail_comment) { |
| 1124 | return false |
| 1125 | } |
| 1126 | emitter.tail_comment = emitter.tail_comment[:0] |
| 1127 | emitter.foot_indent = emitter.indent |
| 1128 | if emitter.foot_indent < 0 { |
| 1129 | emitter.foot_indent = 0 |
| 1130 | } |
| 1131 | } |
| 1132 | |
| 1133 | if len(emitter.head_comment) == 0 { |
| 1134 | return true |
| 1135 | } |
| 1136 | if !yaml_emitter_write_indent(emitter) { |
| 1137 | return false |
| 1138 | } |
| 1139 | if !yaml_emitter_write_comment(emitter, emitter.head_comment) { |
| 1140 | return false |
| 1141 | } |
| 1142 | emitter.head_comment = emitter.head_comment[:0] |
| 1143 | return true |
| 1144 | } |
| 1145 | |
| 1146 | // Write an line comment. |
| 1147 | func yaml_emitter_process_line_comment(emitter *yaml_emitter_t) bool { |
no test coverage detected