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

Method Close

yaml.go:283–287  ·  view source on GitHub ↗

Close closes the encoder by writing any remaining data. It does not write a stream terminating string "...".

()

Source from the content-addressed store, hash-verified

281// Close closes the encoder by writing any remaining data.
282// It does not write a stream terminating string "...".
283func (e *Encoder) Close() (err error) {
284 defer handleErr(&err)
285 e.encoder.finish()
286 return nil
287}
288
289func handleErr(err *error) {
290 if v := recover(); v != nil {

Callers 5

TestSetIndentMethod · 0.95
TestNodeRoundtripMethod · 0.95
TestSetStringMethod · 0.95

Calls 2

handleErrFunction · 0.85
finishMethod · 0.80

Tested by 5

TestSetIndentMethod · 0.76
TestNodeRoundtripMethod · 0.76
TestSetStringMethod · 0.76