Add 'manual' provider to the output of dnshelp (#825)

This commit is contained in:
Ian Bishop 2019-03-12 18:51:23 +10:00 committed by Ludovic Fernandez
parent 5e741000cc
commit 0c87df143e
2 changed files with 12 additions and 4 deletions

View file

@ -6,6 +6,7 @@ package cmd
import ( import (
"fmt" "fmt"
"os" "os"
"sort"
"strings" "strings"
"text/tabwriter" "text/tabwriter"
@ -13,7 +14,8 @@ import (
) )
func allDNSCodes() string { func allDNSCodes() string {
return strings.Join([]string{ providers := []string{
"manual",
"acme-dns", "acme-dns",
"alidns", "alidns",
"auroradns", "auroradns",
@ -67,7 +69,9 @@ func allDNSCodes() string {
"vscale", "vscale",
"vultr", "vultr",
"zoneee", "zoneee",
}, ", ") }
sort.Strings(providers)
return strings.Join(providers, ", ")
} }
func displayDNSHelp(name string) { func displayDNSHelp(name string) {

View file

@ -6,6 +6,7 @@ package cmd
import ( import (
"fmt" "fmt"
"os" "os"
"sort"
"strings" "strings"
"text/tabwriter" "text/tabwriter"
@ -13,11 +14,14 @@ import (
) )
func allDNSCodes() string { func allDNSCodes() string {
return strings.Join([]string{ providers := []string{
"manual",
{{- range $provider := .Providers }} {{- range $provider := .Providers }}
"{{ $provider.Code }}", "{{ $provider.Code }}",
{{- end}} {{- end}}
}, ", ") }
sort.Strings(providers)
return strings.Join(providers, ", ")
} }
func displayDNSHelp(name string) { func displayDNSHelp(name string) {