diff now does sort first
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user