1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

rc: add support for Go 1.6

This commit is contained in:
remusb
2018-03-14 21:48:01 +02:00
committed by Remus Bunduc
parent 86e5a35491
commit 97b48cf988
4 changed files with 40 additions and 16 deletions

View File

@@ -106,9 +106,7 @@ func run(args []string) (err error) {
// Write the JSON blob to stdout if required
if out != nil && !noOutput {
enc := json.NewEncoder(os.Stdout)
enc.SetIndent("", "\t")
err = enc.Encode(out)
err := rc.WriteJSON(os.Stdout, out)
if err != nil {
return errors.Wrap(err, "failed to output JSON")
}