before merging in essential fixes.

This commit is contained in:
Erik Brakkee committed 2025-01-07 09:27:12 +01:00
1 parent ec7a29598d
commit 191c32b743
6 files changed
+170 -72

No files matched your search

+16
View File
@@ -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)
}