Skip to content

Commit

Permalink
Use printf field widths instead of strings.Repeat. (hashicorp#9681)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncabatoff authored Aug 7, 2020
1 parent d8995bf commit 505728a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1513,16 +1513,12 @@ CLUSTER_SYNTHESIS_COMPLETE:
infoKeys = append(infoKeys, "go version")
info["go version"] = runtime.Version()

// Server configuration output
padding := 24

sort.Strings(infoKeys)
c.UI.Output("==> Vault server configuration:\n")

for _, k := range infoKeys {
c.UI.Output(fmt.Sprintf(
"%s%s: %s",
strings.Repeat(" ", padding-len(k)),
"%24s: %s",
strings.Title(k),
info[k]))
}
Expand Down

0 comments on commit 505728a

Please sign in to comment.