CLI help indentation. (#898)

This commit is contained in:
Ludovic Fernandez 2019-05-27 19:20:45 +02:00 committed by GitHub
parent dac7c11895
commit 72a9baf027
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 472 additions and 472 deletions

View file

@ -26,7 +26,7 @@ func createDNSHelp() cli.Command {
func dnsHelp(ctx *cli.Context) error { func dnsHelp(ctx *cli.Context) error {
code := ctx.String("code") code := ctx.String("code")
if code == "" { if code == "" {
w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0) w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
fmt.Fprintln(w, `Credentials for DNS providers must be passed through environment variables.`) fmt.Fprintln(w, `Credentials for DNS providers must be passed through environment variables.`)
fmt.Fprintln(w) fmt.Fprintln(w)

File diff suppressed because it is too large Load diff

View file

@ -25,25 +25,25 @@ func allDNSCodes() string {
} }
func displayDNSHelp(name string) { func displayDNSHelp(name string) {
w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0) w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
switch name { switch name {
{{ range $provider := .Providers }} {{ range $provider := .Providers }}
case "{{ $provider.Code }}": case "{{ $provider.Code }}":
// generated from: {{ .GeneratedFrom }} // generated from: {{ .GeneratedFrom }}
fmt.Fprintln(w, `Configuration for {{ $provider.Name }}.`) fmt.Fprintln(w, `Configuration for {{ $provider.Name }}.`)
fmt.Fprintln(w, `Code: '{{ $provider.Code }}'`) fmt.Fprintln(w, `Code: '{{ $provider.Code }}'`)
fmt.Fprintln(w, `Since: '{{ $provider.Since }}'`) fmt.Fprintln(w, `Since: '{{ $provider.Since }}'`)
fmt.Fprintln(w) fmt.Fprintln(w)
{{if $provider.Configuration }}{{if $provider.Configuration.Credentials }} {{if $provider.Configuration }}{{if $provider.Configuration.Credentials }}
fmt.Fprintln(w, `Credentials:`) fmt.Fprintln(w, `Credentials:`)
{{- range $k, $v := $provider.Configuration.Credentials }} {{- range $k, $v := $provider.Configuration.Credentials }}
fmt.Fprintln(w,` - "{{ $k }}": {{ safe $v }}`) fmt.Fprintln(w,` - "{{ $k }}": {{ safe $v }}`)
{{- end}} {{- end}}
fmt.Fprintln(w) fmt.Fprintln(w)
{{end}}{{if $provider.Configuration.Additional }} {{end}}{{if $provider.Configuration.Additional }}
fmt.Fprintln(w, `Additional Configuration:`) fmt.Fprintln(w, `Additional Configuration:`)
{{- range $k, $v := $provider.Configuration.Additional }} {{- range $k, $v := $provider.Configuration.Additional }}
fmt.Fprintln(w, ` - "{{ $k }}": {{ safe $v }}`) fmt.Fprintln(w, ` - "{{ $k }}": {{ safe $v }}`)
{{- end}} {{- end}}
{{end}}{{end}} {{end}}{{end}}
fmt.Fprintln(w) fmt.Fprintln(w)