mirror of
https://github.com/mikefarah/yq.git
synced 2026-06-16 16:38:31 +00:00
Update pkg/yqlib/encoder_toml.go
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
This commit is contained in:
parent
b8d90fd574
commit
4d620bfa26
@ -34,10 +34,9 @@ func (te *tomlEncoder) Encode(writer io.Writer, node *CandidateNode) error {
|
||||
// Encode to a buffer first if colors are enabled
|
||||
var buf bytes.Buffer
|
||||
var targetWriter io.Writer
|
||||
targetWriter = writer
|
||||
if te.prefs.ColorsEnabled {
|
||||
targetWriter = &buf
|
||||
} else {
|
||||
targetWriter = writer
|
||||
}
|
||||
|
||||
// Encode a root mapping as a sequence of attributes, tables, and arrays of tables
|
||||
|
||||
Loading…
Reference in New Issue
Block a user