| 412 | } |
| 413 | |
| 414 | func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t, head, line, foot, tail []byte) { |
| 415 | // TODO Kill this function. Replace all initialize calls by their underlining Go literals. |
| 416 | implicit := tag == "" |
| 417 | if !implicit { |
| 418 | tag = longTag(tag) |
| 419 | } |
| 420 | e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) |
| 421 | e.event.head_comment = head |
| 422 | e.event.line_comment = line |
| 423 | e.event.foot_comment = foot |
| 424 | e.event.tail_comment = tail |
| 425 | e.emit() |
| 426 | } |
| 427 | |
| 428 | func (e *encoder) nodev(in reflect.Value) { |
| 429 | e.node(in.Interface().(*Node), "") |