before merging in essential fixes.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goccy/go-yaml"
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
func encode(writer io.Writer, data any) error {
|
||||
enc := yaml.NewEncoder(os.Stdout,
|
||||
yaml.UseLiteralStyleIfMultiline(true),
|
||||
yaml.Indent(2), // Set indentation
|
||||
//yaml.UseOrderedMap(), // Preserve map order
|
||||
)
|
||||
return enc.Encode(data)
|
||||
}
|
||||
Reference in New Issue
Block a user