(tag string, in reflect.Value)
| 92 | } |
| 93 | |
| 94 | func (e *encoder) marshalDoc(tag string, in reflect.Value) { |
| 95 | e.init() |
| 96 | var node *Node |
| 97 | if in.IsValid() { |
| 98 | node, _ = in.Interface().(*Node) |
| 99 | } |
| 100 | if node != nil && node.Kind == DocumentNode { |
| 101 | e.nodev(in) |
| 102 | } else { |
| 103 | yaml_document_start_event_initialize(&e.event, nil, nil, true) |
| 104 | e.emit() |
| 105 | e.marshal(tag, in) |
| 106 | yaml_document_end_event_initialize(&e.event, true) |
| 107 | e.emit() |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | func (e *encoder) marshal(tag string, in reflect.Value) { |
| 112 | tag = shortTag(tag) |
no test coverage detected