@@ -42,7 +42,7 @@ Convert YAML, TOML, JSON, or HCL to YAML, TOML, JSON, or HCL.
4242 -cj -c = HCL to JSON
4343 -cc = HCL to HCL
4444-n Do not covert Infinity, -Infinity, and NaN to/from strings
45- -e Escape HTML (JSON/HCL output only)
45+ -e Escape HTML (JSON output only)
4646-k Attempt to parse keys as objects or numbers types (YAML output only)
4747-h Show this help message
4848
@@ -97,12 +97,12 @@ func Run(stdin io.Reader, stdout, stderr io.Writer, osArgs []string) (code int)
9797 // TODO: if from == to, don't do yaml decode/encode to avoid stringifying the keys
9898 rep , err := from (input , config )
9999 if err != nil {
100- fmt .Fprintf (stderr , "Error: %s\n " , err )
100+ fmt .Fprintf (stderr , "Error parsing %s : %s\n " , config . From , err )
101101 return 1
102102 }
103103 output , err := to (rep , config )
104104 if err != nil {
105- fmt .Fprintf (stderr , "Error: %s\n " , err )
105+ fmt .Fprintf (stderr , "Error writing %s : %s\n " , config . To , err )
106106 return 1
107107 }
108108 fmt .Fprintf (stdout , "%s" , output )
@@ -147,7 +147,7 @@ func fromJSON(input []byte, _ *args.Config) (interface{}, error) {
147147 return data , json .Unmarshal (input , & data )
148148}
149149
150- func fromHCL (input []byte , config * args.Config ) (interface {}, error ) {
150+ func fromHCL (input []byte , _ * args.Config ) (interface {}, error ) {
151151 if len (bytes .TrimSpace (input )) == 0 {
152152 return nil , nil
153153 }
0 commit comments