added yamltool sort
This commit is contained in:
@@ -67,6 +67,16 @@ Shows the additions and modifications in <file2> compared to <file1>`,
|
||||
}
|
||||
cmd.AddCommand(parse)
|
||||
|
||||
sort := &cobra.Command{
|
||||
Use: "sort [file1] ... [fileN]",
|
||||
Short: "Sort the yaml output by sorting based on map key ",
|
||||
Long: `Sort yaml files, this makes it easier to also use regular diff`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return sortYaml(cmd, args)
|
||||
},
|
||||
}
|
||||
cmd.AddCommand(sort)
|
||||
|
||||
diff.PersistentFlags().IntVarP(&VERBOSITY, "array-output-level",
|
||||
"v", 3, `Array output level: ,
|
||||
0: no output, only exit status,
|
||||
|
||||
Reference in New Issue
Block a user