From 0c87df143e630a1c50b4c36c8fbdda6cd993ebba Mon Sep 17 00:00:00 2001 From: Ian Bishop <1296987+porjo@users.noreply.github.com> Date: Tue, 12 Mar 2019 18:51:23 +1000 Subject: [PATCH] Add 'manual' provider to the output of dnshelp (#825) --- cmd/zz_gen_cmd_dnshelp.go | 8 ++++++-- internal/dnsdocs/dns.go.tmpl | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cmd/zz_gen_cmd_dnshelp.go b/cmd/zz_gen_cmd_dnshelp.go index 8a462ddf..a5365849 100644 --- a/cmd/zz_gen_cmd_dnshelp.go +++ b/cmd/zz_gen_cmd_dnshelp.go @@ -6,6 +6,7 @@ package cmd import ( "fmt" "os" + "sort" "strings" "text/tabwriter" @@ -13,7 +14,8 @@ import ( ) func allDNSCodes() string { - return strings.Join([]string{ + providers := []string{ + "manual", "acme-dns", "alidns", "auroradns", @@ -67,7 +69,9 @@ func allDNSCodes() string { "vscale", "vultr", "zoneee", - }, ", ") + } + sort.Strings(providers) + return strings.Join(providers, ", ") } func displayDNSHelp(name string) { diff --git a/internal/dnsdocs/dns.go.tmpl b/internal/dnsdocs/dns.go.tmpl index 0332bc18..d3dd17aa 100644 --- a/internal/dnsdocs/dns.go.tmpl +++ b/internal/dnsdocs/dns.go.tmpl @@ -6,6 +6,7 @@ package cmd import ( "fmt" "os" + "sort" "strings" "text/tabwriter" @@ -13,11 +14,14 @@ import ( ) func allDNSCodes() string { - return strings.Join([]string{ + providers := []string{ + "manual", {{- range $provider := .Providers }} "{{ $provider.Code }}", {{- end}} - }, ", ") + } + sort.Strings(providers) + return strings.Join(providers, ", ") } func displayDNSHelp(name string) {