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

Function yaml_emitter_process_scalar

emitterc.go:1097–1115  ·  view source on GitHub ↗

Write a scalar.

(emitter *yaml_emitter_t)

Source from the content-addressed store, hash-verified

1095
1096// Write a scalar.
1097func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool {
1098 switch emitter.scalar_data.style {
1099 case yaml_PLAIN_SCALAR_STYLE:
1100 return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context)
1101
1102 case yaml_SINGLE_QUOTED_SCALAR_STYLE:
1103 return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context)
1104
1105 case yaml_DOUBLE_QUOTED_SCALAR_STYLE:
1106 return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context)
1107
1108 case yaml_LITERAL_SCALAR_STYLE:
1109 return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value)
1110
1111 case yaml_FOLDED_SCALAR_STYLE:
1112 return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value)
1113 }
1114 panic("unknown scalar style")
1115}
1116
1117// Write a head comment.
1118func yaml_emitter_process_head_comment(emitter *yaml_emitter_t) bool {

Callers 1

yaml_emitter_emit_scalarFunction · 0.85

Tested by

no test coverage detected