Files
truecharts/clustertool/pkg/helper/marshaller.go
T
2024-10-19 15:18:05 +02:00

15 lines
225 B
Go

package helper
import (
"bytes"
"gopkg.in/yaml.v3"
)
func MarshalYaml(buf *bytes.Buffer, v interface{}) error {
enc := yaml.NewEncoder(buf)
defer enc.Close()
enc.SetIndent(2)
return enc.Encode(v)
}