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 {
code := ctx.String("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)

File diff suppressed because it is too large Load diff

View file

@ -25,25 +25,25 @@ func allDNSCodes() 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 {
{{ range $provider := .Providers }}
case "{{ $provider.Code }}":
// generated from: {{ .GeneratedFrom }}
fmt.Fprintln(w, `Configuration for {{ $provider.Name }}.`)
fmt.Fprintln(w, `Code: '{{ $provider.Code }}'`)
fmt.Fprintln(w, `Since: '{{ $provider.Since }}'`)
fmt.Fprintln(w, `Code: '{{ $provider.Code }}'`)
fmt.Fprintln(w, `Since: '{{ $provider.Since }}'`)
fmt.Fprintln(w)
{{if $provider.Configuration }}{{if $provider.Configuration.Credentials }}
fmt.Fprintln(w, `Credentials:`)
{{- range $k, $v := $provider.Configuration.Credentials }}
fmt.Fprintln(w,` - "{{ $k }}": {{ safe $v }}`)
fmt.Fprintln(w,` - "{{ $k }}": {{ safe $v }}`)
{{- end}}
fmt.Fprintln(w)
{{end}}{{if $provider.Configuration.Additional }}
fmt.Fprintln(w, `Additional Configuration:`)
{{- range $k, $v := $provider.Configuration.Additional }}
fmt.Fprintln(w, ` - "{{ $k }}": {{ safe $v }}`)
fmt.Fprintln(w, ` - "{{ $k }}": {{ safe $v }}`)
{{- end}}
{{end}}{{end}}
fmt.Fprintln(w)