From fc6bdfe25395c00e5075cefe702d19f7b74fc55c Mon Sep 17 00:00:00 2001 From: ibib Date: Sat, 11 Feb 2017 22:36:19 +0100 Subject: [PATCH] Small text changes --- src/cmds/restic/cmd_snapshots.go | 4 ++-- src/cmds/restic/global.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmds/restic/cmd_snapshots.go b/src/cmds/restic/cmd_snapshots.go index b970179bb..03243cb70 100644 --- a/src/cmds/restic/cmd_snapshots.go +++ b/src/cmds/restic/cmd_snapshots.go @@ -96,7 +96,7 @@ func runSnapshots(opts SnapshotOptions, gopts GlobalOptions, args []string) erro return nil } -//printSnapshotsReadable provides human redability +// printSnapshotsReadable prints a text table of the snapshots in list to stdout. func printSnapshotsReadable(list []*restic.Snapshot) { tab := NewTable() @@ -160,7 +160,7 @@ type Snapshot struct { Directories []string `json:"directories"` } -//printSnapshotsJSON provides machine redability +// printSnapshotsJSON writes the JSON representation of list to stdout. func printSnapshotsJSON(list []*restic.Snapshot) error { enc := json.NewEncoder(os.Stdout) diff --git a/src/cmds/restic/global.go b/src/cmds/restic/global.go index 94d77dad3..b73d9de47 100644 --- a/src/cmds/restic/global.go +++ b/src/cmds/restic/global.go @@ -54,7 +54,7 @@ func init() { f.StringVarP(&globalOptions.PasswordFile, "password-file", "p", "", "read the repository password from a file") f.BoolVarP(&globalOptions.Quiet, "quiet", "q", false, "do not output comprehensive progress report") f.BoolVar(&globalOptions.NoLock, "no-lock", false, "do not lock the repo, this allows some operations on read-only repos") - f.BoolVarP(&globalOptions.JSON, "json", "", false, `print snapshots in json format`) + f.BoolVarP(&globalOptions.JSON, "json", "", false, "set output mode to JSON for commands that support it") restoreTerminal() }