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

Method slicev

encode.go:270–285  ·  view source on GitHub ↗
(tag string, in reflect.Value)

Source from the content-addressed store, hash-verified

268}
269
270func (e *encoder) slicev(tag string, in reflect.Value) {
271 implicit := tag == ""
272 style := yaml_BLOCK_SEQUENCE_STYLE
273 if e.flow {
274 e.flow = false
275 style = yaml_FLOW_SEQUENCE_STYLE
276 }
277 e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style))
278 e.emit()
279 n := in.Len()
280 for i := 0; i < n; i++ {
281 e.marshal("", in.Index(i))
282 }
283 e.must(yaml_sequence_end_event_initialize(&e.event))
284 e.emit()
285}
286
287// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1.
288//

Callers 1

marshalMethod · 0.95

Calls 6

mustMethod · 0.95
emitMethod · 0.95
marshalMethod · 0.95
LenMethod · 0.80

Tested by

no test coverage detected