diff options
| author | Joe Richey joerichey@google.com <joerichey@google.com> | 2017-10-17 18:10:54 -0700 |
|---|---|---|
| committer | Joseph Richey <joerichey94@gmail.com> | 2017-10-19 02:22:28 -0700 |
| commit | 7847ab8270efab472b7b6a4bf9a57f5b83cb7212 (patch) | |
| tree | dc8cb96be83a978389cd59793d18ad13af8df312 /cmd/fscrypt/status.go | |
| parent | 36b313c802f9a8d23f2ad8ce5a59aa05f5925a2f (diff) | |
fmt almost done
Diffstat (limited to 'cmd/fscrypt/status.go')
| -rw-r--r-- | cmd/fscrypt/status.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd/fscrypt/status.go b/cmd/fscrypt/status.go index 87799a8..e9c2d8d 100644 --- a/cmd/fscrypt/status.go +++ b/cmd/fscrypt/status.go @@ -38,7 +38,7 @@ import ( // Creates a writer which correctly aligns tabs with the specified header. // Must call Flush() when done. func makeTableWriter(w io.Writer, header string) *tabwriter.Writer { - tableWriter := tabwriter.NewWriter(w, 0, indentLength, indentLength, ' ', 0) + tableWriter := tabwriter.NewWriter(cmd.Output, 0, cmd.TabWidth, cmd.TabWidth, ' ', 0) fmt.Fprintln(tableWriter, header) return tableWriter } @@ -140,8 +140,10 @@ func writeFilesystemStatus(ctx *actions.Context) error { return err } - fmt.Fprintf(w, "%s filesystem %q has %s and %s\n\n", ctx.Mount.Filesystem, ctx.Mount.Path, - pluralize(len(options), "protector"), pluralize(len(policyDescriptors), "policy")) + fmt.Fprintf(cmd.Output, "%s filesystem %q has %s and %s\n\n", + ctx.Mount.Filesystem, ctx.Mount.Path, + cmd.Pluralize(len(options), "protector"), + cmd.Pluralize(len(policyDescriptors), "policy")) if len(options) > 0 { writeOptions(options) @@ -183,7 +185,7 @@ func writePathStatus(path string) error { fmt.Fprintln(cmd.Output) options := policy.ProtectorOptions() - fmt.Fprintf(cmd.Output, "Protected with %s:\n", pluralize(len(options), "protector")) - writeOptions(cmd.Output, options) + fmt.Fprintf(cmd.Output, "Protected with %s:\n", cmd.Pluralize(len(options), "protector")) + writeOptions(options) return nil } |