diff now does sort first

This commit is contained in:
2026-10-19 20:12:33 +02:00
parent 67ce736fd0
commit 5137646157
5 changed files with 105 additions and 3 deletions
+6 -1
View File
@@ -3,6 +3,7 @@ package main
import (
"bytes"
"fmt"
"os"
"github.com/goccy/go-yaml"
"github.com/spf13/cobra"
@@ -25,10 +26,14 @@ func parseFiles(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
_, err = parse(data)
decoded, err := parse(data)
if err != nil {
fmt.Printf("%s: %v\n", arg, err.Error())
}
if len(args) > 1 {
fmt.Printf("---\n")
}
encode(os.Stdout, decoded)
}
return nil
}