| 1 | package yamlscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/ |
| 2 | |
| 3 | // Set the writer error and return false. |
| 4 | func yaml_emitter_set_writer_errorscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_set_writer_error().(emitter *yaml_emitter_tscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#, problem string) bool { |
| 5 | emitter.errorscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#error. = yaml_WRITER_ERRORscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_WRITER_ERROR. |
| 6 | emitter.problemscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#problem. = problem |
| 7 | return false |
| 8 | } |
| 9 | |
| 10 | // Flush the output buffer. |
| 11 | func yaml_emitter_flushscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_flush().(emitter *yaml_emitter_tscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#) bool { |
| 12 | if emitter.write_handlerscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#write_handler. == nil { |
| 13 | panic("write handler not set") |
| 14 | } |
| 15 | |
| 16 | // Check if the buffer is empty. |
| 17 | if emitter.buffer_posscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#buffer_pos. == 0 { |
| 18 | return true |
| 19 | } |
| 20 | |
| 21 | if err := emitter.write_handlerscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#write_handler.(emitter, emitter.bufferscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#buffer.[:emitter.buffer_posscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#buffer_pos.]); err != nil { |
| 22 | return yaml_emitter_set_writer_errorscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_set_writer_error().(emitter, "write error: "+err.Error()) |
| 23 | } |
| 24 | emitter.buffer_posscip-go gomod go.yaml.in/yaml/v2 . `go.yaml.in/yaml/v2`/yaml_emitter_t#buffer_pos. = 0 |
| 25 | return true |
| 26 | } |