From 64459d5a250fa7d803f0c4e0ad8da54b6224e937 Mon Sep 17 00:00:00 2001 From: Dominik Menke Date: Sat, 26 Oct 2024 00:14:34 +0200 Subject: [PATCH 1/3] dev: update readme generator This changes the provider table generator to output an HTML table directly, instead of writing Markdown markup. This is an attempt of keeping future PRs introducing new providers a little less noisy. --- README.md | 249 ++++++++++++++++++++++++++----- internal/dns/docs/generator.go | 107 +++++-------- internal/dns/docs/readme.md.tmpl | 11 ++ 3 files changed, 258 insertions(+), 109 deletions(-) create mode 100644 internal/dns/docs/readme.md.tmpl diff --git a/README.md b/README.md index 586881e8ed..f4eae462cb 100644 --- a/README.md +++ b/README.md @@ -51,43 +51,218 @@ Detailed documentation is available [here](https://go-acme.github.io/lego/dns). -| | | | | -|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------| -| [Akamai EdgeDNS](https://go-acme.github.io/lego/dns/edgedns/) | [Alibaba Cloud DNS](https://go-acme.github.io/lego/dns/alidns/) | [all-inkl](https://go-acme.github.io/lego/dns/allinkl/) | [Amazon Lightsail](https://go-acme.github.io/lego/dns/lightsail/) | -| [Amazon Route 53](https://go-acme.github.io/lego/dns/route53/) | [ArvanCloud](https://go-acme.github.io/lego/dns/arvancloud/) | [Aurora DNS](https://go-acme.github.io/lego/dns/auroradns/) | [Autodns](https://go-acme.github.io/lego/dns/autodns/) | -| [Azure (deprecated)](https://go-acme.github.io/lego/dns/azure/) | [Azure DNS](https://go-acme.github.io/lego/dns/azuredns/) | [Bindman](https://go-acme.github.io/lego/dns/bindman/) | [Bluecat](https://go-acme.github.io/lego/dns/bluecat/) | -| [Brandit](https://go-acme.github.io/lego/dns/brandit/) | [Bunny](https://go-acme.github.io/lego/dns/bunny/) | [Checkdomain](https://go-acme.github.io/lego/dns/checkdomain/) | [Civo](https://go-acme.github.io/lego/dns/civo/) | -| [Cloud.ru](https://go-acme.github.io/lego/dns/cloudru/) | [CloudDNS](https://go-acme.github.io/lego/dns/clouddns/) | [Cloudflare](https://go-acme.github.io/lego/dns/cloudflare/) | [ClouDNS](https://go-acme.github.io/lego/dns/cloudns/) | -| [CloudXNS](https://go-acme.github.io/lego/dns/cloudxns/) | [ConoHa](https://go-acme.github.io/lego/dns/conoha/) | [Constellix](https://go-acme.github.io/lego/dns/constellix/) | [Core-Networks](https://go-acme.github.io/lego/dns/corenetworks/) | -| [CPanel/WHM](https://go-acme.github.io/lego/dns/cpanel/) | [Derak Cloud](https://go-acme.github.io/lego/dns/derak/) | [deSEC.io](https://go-acme.github.io/lego/dns/desec/) | [Designate DNSaaS for Openstack](https://go-acme.github.io/lego/dns/designate/) | -| [Digital Ocean](https://go-acme.github.io/lego/dns/digitalocean/) | [DirectAdmin](https://go-acme.github.io/lego/dns/directadmin/) | [DNS Made Easy](https://go-acme.github.io/lego/dns/dnsmadeeasy/) | [dnsHome.de](https://go-acme.github.io/lego/dns/dnshomede/) | -| [DNSimple](https://go-acme.github.io/lego/dns/dnsimple/) | [DNSPod (deprecated)](https://go-acme.github.io/lego/dns/dnspod/) | [Domain Offensive (do.de)](https://go-acme.github.io/lego/dns/dode/) | [Domeneshop](https://go-acme.github.io/lego/dns/domeneshop/) | -| [DreamHost](https://go-acme.github.io/lego/dns/dreamhost/) | [Duck DNS](https://go-acme.github.io/lego/dns/duckdns/) | [Dyn](https://go-acme.github.io/lego/dns/dyn/) | [Dynu](https://go-acme.github.io/lego/dns/dynu/) | -| [EasyDNS](https://go-acme.github.io/lego/dns/easydns/) | [Efficient IP](https://go-acme.github.io/lego/dns/efficientip/) | [Epik](https://go-acme.github.io/lego/dns/epik/) | [Exoscale](https://go-acme.github.io/lego/dns/exoscale/) | -| [External program](https://go-acme.github.io/lego/dns/exec/) | [freemyip.com](https://go-acme.github.io/lego/dns/freemyip/) | [G-Core](https://go-acme.github.io/lego/dns/gcore/) | [Gandi Live DNS (v5)](https://go-acme.github.io/lego/dns/gandiv5/) | -| [Gandi](https://go-acme.github.io/lego/dns/gandi/) | [Glesys](https://go-acme.github.io/lego/dns/glesys/) | [Go Daddy](https://go-acme.github.io/lego/dns/godaddy/) | [Google Cloud](https://go-acme.github.io/lego/dns/gcloud/) | -| [Google Domains](https://go-acme.github.io/lego/dns/googledomains/) | [Hetzner](https://go-acme.github.io/lego/dns/hetzner/) | [Hosting.de](https://go-acme.github.io/lego/dns/hostingde/) | [Hosttech](https://go-acme.github.io/lego/dns/hosttech/) | -| [HTTP request](https://go-acme.github.io/lego/dns/httpreq/) | [http.net](https://go-acme.github.io/lego/dns/httpnet/) | [Huawei Cloud](https://go-acme.github.io/lego/dns/huaweicloud/) | [Hurricane Electric DNS](https://go-acme.github.io/lego/dns/hurricane/) | -| [HyperOne](https://go-acme.github.io/lego/dns/hyperone/) | [IBM Cloud (SoftLayer)](https://go-acme.github.io/lego/dns/ibmcloud/) | [IIJ DNS Platform Service](https://go-acme.github.io/lego/dns/iijdpf/) | [Infoblox](https://go-acme.github.io/lego/dns/infoblox/) | -| [Infomaniak](https://go-acme.github.io/lego/dns/infomaniak/) | [Internet Initiative Japan](https://go-acme.github.io/lego/dns/iij/) | [Internet.bs](https://go-acme.github.io/lego/dns/internetbs/) | [INWX](https://go-acme.github.io/lego/dns/inwx/) | -| [Ionos](https://go-acme.github.io/lego/dns/ionos/) | [IPv64](https://go-acme.github.io/lego/dns/ipv64/) | [iwantmyname](https://go-acme.github.io/lego/dns/iwantmyname/) | [Joker](https://go-acme.github.io/lego/dns/joker/) | -| [Joohoi's ACME-DNS](https://go-acme.github.io/lego/dns/acme-dns/) | [Liara](https://go-acme.github.io/lego/dns/liara/) | [Lima-City](https://go-acme.github.io/lego/dns/limacity/) | [Linode (v4)](https://go-acme.github.io/lego/dns/linode/) | -| [Liquid Web](https://go-acme.github.io/lego/dns/liquidweb/) | [Loopia](https://go-acme.github.io/lego/dns/loopia/) | [LuaDNS](https://go-acme.github.io/lego/dns/luadns/) | [Mail-in-a-Box](https://go-acme.github.io/lego/dns/mailinabox/) | -| [Manual](https://go-acme.github.io/lego/dns/manual/) | [Metaname](https://go-acme.github.io/lego/dns/metaname/) | [mijn.host](https://go-acme.github.io/lego/dns/mijnhost/) | [Mittwald](https://go-acme.github.io/lego/dns/mittwald/) | -| [MyDNS.jp](https://go-acme.github.io/lego/dns/mydnsjp/) | [MythicBeasts](https://go-acme.github.io/lego/dns/mythicbeasts/) | [Name.com](https://go-acme.github.io/lego/dns/namedotcom/) | [Namecheap](https://go-acme.github.io/lego/dns/namecheap/) | -| [Namesilo](https://go-acme.github.io/lego/dns/namesilo/) | [NearlyFreeSpeech.NET](https://go-acme.github.io/lego/dns/nearlyfreespeech/) | [Netcup](https://go-acme.github.io/lego/dns/netcup/) | [Netlify](https://go-acme.github.io/lego/dns/netlify/) | -| [Nicmanager](https://go-acme.github.io/lego/dns/nicmanager/) | [NIFCloud](https://go-acme.github.io/lego/dns/nifcloud/) | [Njalla](https://go-acme.github.io/lego/dns/njalla/) | [Nodion](https://go-acme.github.io/lego/dns/nodion/) | -| [NS1](https://go-acme.github.io/lego/dns/ns1/) | [Open Telekom Cloud](https://go-acme.github.io/lego/dns/otc/) | [Oracle Cloud](https://go-acme.github.io/lego/dns/oraclecloud/) | [OVH](https://go-acme.github.io/lego/dns/ovh/) | -| [plesk.com](https://go-acme.github.io/lego/dns/plesk/) | [Porkbun](https://go-acme.github.io/lego/dns/porkbun/) | [PowerDNS](https://go-acme.github.io/lego/dns/pdns/) | [Rackspace](https://go-acme.github.io/lego/dns/rackspace/) | -| [RcodeZero](https://go-acme.github.io/lego/dns/rcodezero/) | [reg.ru](https://go-acme.github.io/lego/dns/regru/) | [RFC2136](https://go-acme.github.io/lego/dns/rfc2136/) | [RimuHosting](https://go-acme.github.io/lego/dns/rimuhosting/) | -| [Sakura Cloud](https://go-acme.github.io/lego/dns/sakuracloud/) | [Scaleway](https://go-acme.github.io/lego/dns/scaleway/) | [Selectel v2](https://go-acme.github.io/lego/dns/selectelv2/) | [Selectel](https://go-acme.github.io/lego/dns/selectel/) | -| [SelfHost.(de/eu)](https://go-acme.github.io/lego/dns/selfhostde/) | [Servercow](https://go-acme.github.io/lego/dns/servercow/) | [Shellrent](https://go-acme.github.io/lego/dns/shellrent/) | [Simply.com](https://go-acme.github.io/lego/dns/simply/) | -| [Sonic](https://go-acme.github.io/lego/dns/sonic/) | [Stackpath](https://go-acme.github.io/lego/dns/stackpath/) | [Tencent Cloud DNS](https://go-acme.github.io/lego/dns/tencentcloud/) | [Timeweb Cloud](https://go-acme.github.io/lego/dns/timewebcloud/) | -| [TransIP](https://go-acme.github.io/lego/dns/transip/) | [UKFast SafeDNS](https://go-acme.github.io/lego/dns/safedns/) | [Ultradns](https://go-acme.github.io/lego/dns/ultradns/) | [Variomedia](https://go-acme.github.io/lego/dns/variomedia/) | -| [VegaDNS](https://go-acme.github.io/lego/dns/vegadns/) | [Vercel](https://go-acme.github.io/lego/dns/vercel/) | [Versio.[nl/eu/uk]](https://go-acme.github.io/lego/dns/versio/) | [VinylDNS](https://go-acme.github.io/lego/dns/vinyldns/) | -| [VK Cloud](https://go-acme.github.io/lego/dns/vkcloud/) | [Volcano Engine/火山引擎](https://go-acme.github.io/lego/dns/volcengine/) | [Vscale](https://go-acme.github.io/lego/dns/vscale/) | [Vultr](https://go-acme.github.io/lego/dns/vultr/) | -| [Webnames](https://go-acme.github.io/lego/dns/webnames/) | [Websupport](https://go-acme.github.io/lego/dns/websupport/) | [WEDOS](https://go-acme.github.io/lego/dns/wedos/) | [Yandex 360](https://go-acme.github.io/lego/dns/yandex360/) | -| [Yandex Cloud](https://go-acme.github.io/lego/dns/yandexcloud/) | [Yandex PDD](https://go-acme.github.io/lego/dns/yandex/) | [Zone.ee](https://go-acme.github.io/lego/dns/zoneee/) | [Zonomi](https://go-acme.github.io/lego/dns/zonomi/) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Akamai EdgeDNSAlibaba Cloud DNSall-inklAmazon Lightsail
Amazon Route 53ArvanCloudAurora DNSAutodns
Azure (deprecated)Azure DNSBindmanBluecat
BranditBunnyCheckdomainCivo
Cloud.ruCloudDNSCloudflareClouDNS
CloudXNSConoHaConstellixCore-Networks
CPanel/WHMDerak ClouddeSEC.ioDesignate DNSaaS for Openstack
Digital OceanDirectAdminDNS Made EasydnsHome.de
DNSimpleDNSPod (deprecated)Domain Offensive (do.de)Domeneshop
DreamHostDuck DNSDynDynu
EasyDNSEfficient IPEpikExoscale
External programfreemyip.comG-CoreGandi
Gandi Live DNS (v5)GlesysGo DaddyGoogle Cloud
Google DomainsHetznerHosting.deHosttech
HTTP requesthttp.netHuawei CloudHurricane Electric DNS
HyperOneIBM Cloud (SoftLayer)IIJ DNS Platform ServiceInfoblox
InfomaniakInternet Initiative JapanInternet.bsINWX
IonosIPv64iwantmynameJoker
Joohoi's ACME-DNSLiaraLima-CityLinode (v4)
Liquid WebLoopiaLuaDNSMail-in-a-Box
ManualMetanamemijn.hostMittwald
MyDNS.jpMythicBeastsName.comNamecheap
NamesiloNearlyFreeSpeech.NETNetcupNetlify
NicmanagerNIFCloudNjallaNodion
NS1Open Telekom CloudOracle CloudOVH
plesk.comPorkbunPowerDNSRackspace
RcodeZeroreg.ruRFC2136RimuHosting
Sakura CloudScalewaySelectelSelectel v2
SelfHost.(de|eu)ServercowShellrentSimply.com
SonicStackpathTencent Cloud DNSTimeweb Cloud
TransIPUKFast SafeDNSUltradnsVariomedia
VegaDNSVercelVersio.[nl|eu|uk]VinylDNS
VK CloudVolcano Engine/火山引擎VscaleVultr
WebnamesWebsupportWEDOSYandex 360
Yandex CloudYandex PDDZone.eeZonomi
diff --git a/internal/dns/docs/generator.go b/internal/dns/docs/generator.go index 30e543faa3..1afbeffd04 100644 --- a/internal/dns/docs/generator.go +++ b/internal/dns/docs/generator.go @@ -8,7 +8,7 @@ import ( "errors" "fmt" "go/format" - "io" + html "html/template" "log" "os" "path/filepath" @@ -22,11 +22,12 @@ import ( const ( root = "../../../" - mdTemplate = root + "internal/dns/docs/dns.md.tmpl" - cliTemplate = root + "internal/dns/docs/dns.go.tmpl" - cliOutput = root + "cmd/zz_gen_cmd_dnshelp.go" - docOutput = root + "docs/content/dns" - readmePath = root + "README.md" + mdTemplate = root + "internal/dns/docs/dns.md.tmpl" + cliTemplate = root + "internal/dns/docs/dns.go.tmpl" + cliOutput = root + "cmd/zz_gen_cmd_dnshelp.go" + docOutput = root + "docs/content/dns" + readmeTemplate = root + "internal/dns/docs/readme.md.tmpl" + readmePath = root + "README.md" ) const ( @@ -109,7 +110,8 @@ func generateCLIHelp(models *descriptors.Providers) error { } func generateReadMe(models *descriptors.Providers) error { - maximum, lines := extractTableData(models) + tpl := html.Must(html.New(filepath.Base(readmeTemplate)).ParseFiles(readmeTemplate)) + providers := orderProviders(models) file, err := os.Open(readmePath) if err != nil { @@ -128,8 +130,7 @@ func generateReadMe(models *descriptors.Providers) error { if text == startLine { _, _ = fmt.Fprintln(buffer, text) - err = writeDNSTable(buffer, lines, maximum) - if err != nil { + if err = tpl.Execute(buffer, providers); err != nil { return err } skip = true @@ -157,83 +158,45 @@ func generateReadMe(models *descriptors.Providers) error { return os.WriteFile(readmePath, buffer.Bytes(), 0o666) } -func extractTableData(models *descriptors.Providers) (int, [][]string) { - readmePattern := "[%s](https://go-acme.github.io/lego/dns/%s/)" - - items := []string{fmt.Sprintf(readmePattern, "Manual", "manual")} - - var maximum int - - for _, pvd := range models.Providers { - item := fmt.Sprintf(readmePattern, strings.ReplaceAll(pvd.Name, "|", "/"), pvd.Code) - items = append(items, item) - - if maximum < len(item) { - maximum = len(item) - } - } +func orderProviders(models *descriptors.Providers) [][]descriptors.Provider { + providers := append(models.Providers, descriptors.Provider{ + Name: "Manual", + Code: "manual", + }) const nbCol = 4 - sort.Slice(items, func(i, j int) bool { - return strings.ToLower(items[i]) < strings.ToLower(items[j]) + sort.Slice(providers, func(i, j int) bool { + return strings.ToLower(providers[i].Name) < strings.ToLower(providers[j].Name) }) - var lines [][]string - var line []string + var matrix [][]descriptors.Provider + var row []descriptors.Provider - for i, item := range items { + for i, p := range providers { switch { - case len(line) == nbCol: - lines = append(lines, line) - line = []string{item} - - case i == len(items)-1: - line = append(line, item) - for j := len(line); j < nbCol; j++ { - line = append(line, "") + case len(row) == nbCol: + matrix = append(matrix, row) + row = []descriptors.Provider{p} + + case i == len(providers)-1: + row = append(row, p) + for j := len(row); j < nbCol; j++ { + row = append(row, descriptors.Provider{}) } - lines = append(lines, line) + matrix = append(matrix, row) default: - line = append(line, item) + row = append(row, p) } } - if len(line) < nbCol { - for j := len(line); j < nbCol; j++ { - line = append(line, "") - } - lines = append(lines, line) - } - - return maximum, lines -} - -func writeDNSTable(w io.Writer, lines [][]string, size int) error { - _, err := fmt.Fprintf(w, "\n") - if err != nil { - return err - } - - _, err = fmt.Fprintf(w, "|%[1]s|%[1]s|%[1]s|%[1]s|\n", strings.Repeat(" ", size+2)) - if err != nil { - return err - } - - _, err = fmt.Fprintf(w, "|%[1]s|%[1]s|%[1]s|%[1]s|\n", strings.Repeat("-", size+2)) - if err != nil { - return err - } - - linePattern := fmt.Sprintf("| %%-%[1]ds | %%-%[1]ds | %%-%[1]ds | %%-%[1]ds |\n", size) - for _, line := range lines { - _, err = fmt.Fprintf(w, linePattern, line[0], line[1], line[2], line[3]) - if err != nil { - return err + if len(row) < nbCol { + for j := len(row); j < nbCol; j++ { + row = append(row, descriptors.Provider{}) } + matrix = append(matrix, row) } - _, err = fmt.Fprintf(w, "\n") - return err + return matrix } diff --git a/internal/dns/docs/readme.md.tmpl b/internal/dns/docs/readme.md.tmpl new file mode 100644 index 0000000000..c478528783 --- /dev/null +++ b/internal/dns/docs/readme.md.tmpl @@ -0,0 +1,11 @@ + + + {{- range . }} + + {{- range . }} + + {{- end }} + + {{- end }} +
{{ .Name }}
+ From 5b8c591b0f933544ade5c49109c5f6469d48bd6a Mon Sep 17 00:00:00 2001 From: Dominik Menke Date: Sat, 26 Oct 2024 00:53:07 +0200 Subject: [PATCH 2/3] reduce potential noise even further --- README.md | 388 ++++++++++++++----------------- internal/dns/docs/readme.md.tmpl | 10 +- 2 files changed, 181 insertions(+), 217 deletions(-) diff --git a/README.md b/README.md index f4eae462cb..1e16afebc9 100644 --- a/README.md +++ b/README.md @@ -51,218 +51,182 @@ Detailed documentation is available [here](https://go-acme.github.io/lego/dns). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Akamai EdgeDNSAlibaba Cloud DNSall-inklAmazon Lightsail
Amazon Route 53ArvanCloudAurora DNSAutodns
Azure (deprecated)Azure DNSBindmanBluecat
BranditBunnyCheckdomainCivo
Cloud.ruCloudDNSCloudflareClouDNS
CloudXNSConoHaConstellixCore-Networks
CPanel/WHMDerak ClouddeSEC.ioDesignate DNSaaS for Openstack
Digital OceanDirectAdminDNS Made EasydnsHome.de
DNSimpleDNSPod (deprecated)Domain Offensive (do.de)Domeneshop
DreamHostDuck DNSDynDynu
EasyDNSEfficient IPEpikExoscale
External programfreemyip.comG-CoreGandi
Gandi Live DNS (v5)GlesysGo DaddyGoogle Cloud
Google DomainsHetznerHosting.deHosttech
HTTP requesthttp.netHuawei CloudHurricane Electric DNS
HyperOneIBM Cloud (SoftLayer)IIJ DNS Platform ServiceInfoblox
InfomaniakInternet Initiative JapanInternet.bsINWX
IonosIPv64iwantmynameJoker
Joohoi's ACME-DNSLiaraLima-CityLinode (v4)
Liquid WebLoopiaLuaDNSMail-in-a-Box
ManualMetanamemijn.hostMittwald
MyDNS.jpMythicBeastsName.comNamecheap
NamesiloNearlyFreeSpeech.NETNetcupNetlify
NicmanagerNIFCloudNjallaNodion
NS1Open Telekom CloudOracle CloudOVH
plesk.comPorkbunPowerDNSRackspace
RcodeZeroreg.ruRFC2136RimuHosting
Sakura CloudScalewaySelectelSelectel v2
SelfHost.(de|eu)ServercowShellrentSimply.com
SonicStackpathTencent Cloud DNSTimeweb Cloud
TransIPUKFast SafeDNSUltradnsVariomedia
VegaDNSVercelVersio.[nl|eu|uk]VinylDNS
VK CloudVolcano Engine/火山引擎VscaleVultr
WebnamesWebsupportWEDOSYandex 360
Yandex CloudYandex PDDZone.eeZonomi
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Akamai EdgeDNSAlibaba Cloud DNSall-inklAmazon Lightsail
Amazon Route 53ArvanCloudAurora DNSAutodns
Azure (deprecated)Azure DNSBindmanBluecat
BranditBunnyCheckdomainCivo
Cloud.ruCloudDNSCloudflareClouDNS
CloudXNSConoHaConstellixCore-Networks
CPanel/WHMDerak ClouddeSEC.ioDesignate DNSaaS for Openstack
Digital OceanDirectAdminDNS Made EasydnsHome.de
DNSimpleDNSPod (deprecated)Domain Offensive (do.de)Domeneshop
DreamHostDuck DNSDynDynu
EasyDNSEfficient IPEpikExoscale
External programfreemyip.comG-CoreGandi
Gandi Live DNS (v5)GlesysGo DaddyGoogle Cloud
Google DomainsHetznerHosting.deHosttech
HTTP requesthttp.netHuawei CloudHurricane Electric DNS
HyperOneIBM Cloud (SoftLayer)IIJ DNS Platform ServiceInfoblox
InfomaniakInternet Initiative JapanInternet.bsINWX
IonosIPv64iwantmynameJoker
Joohoi's ACME-DNSLiaraLima-CityLinode (v4)
Liquid WebLoopiaLuaDNSMail-in-a-Box
ManualMetanamemijn.hostMittwald
MyDNS.jpMythicBeastsName.comNamecheap
NamesiloNearlyFreeSpeech.NETNetcupNetlify
NicmanagerNIFCloudNjallaNodion
NS1Open Telekom CloudOracle CloudOVH
plesk.comPorkbunPowerDNSRackspace
RcodeZeroreg.ruRFC2136RimuHosting
Sakura CloudScalewaySelectelSelectel v2
SelfHost.(de|eu)ServercowShellrentSimply.com
SonicStackpathTencent Cloud DNSTimeweb Cloud
TransIPUKFast SafeDNSUltradnsVariomedia
VegaDNSVercelVersio.[nl|eu|uk]VinylDNS
VK CloudVolcano Engine/火山引擎VscaleVultr
WebnamesWebsupportWEDOSYandex 360
Yandex CloudYandex PDDZone.eeZonomi
diff --git a/internal/dns/docs/readme.md.tmpl b/internal/dns/docs/readme.md.tmpl index c478528783..3e0140243a 100644 --- a/internal/dns/docs/readme.md.tmpl +++ b/internal/dns/docs/readme.md.tmpl @@ -1,11 +1,11 @@ +{{- range . -}} + {{- range . }} - - {{- range . }} - - {{- end }} - + {{- end }} + +{{- end -}}
{{ .Name }}
{{ .Name }}
From 0ae115e1916c3e0bc6d9b73b7a96cd98e8ae75d5 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 26 Oct 2024 03:21:12 +0200 Subject: [PATCH 3/3] review: minor changes --- internal/dns/docs/generator.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/dns/docs/generator.go b/internal/dns/docs/generator.go index 1afbeffd04..3ffdcc92c5 100644 --- a/internal/dns/docs/generator.go +++ b/internal/dns/docs/generator.go @@ -12,7 +12,7 @@ import ( "log" "os" "path/filepath" - "sort" + "slices" "strings" "text/template" @@ -166,8 +166,8 @@ func orderProviders(models *descriptors.Providers) [][]descriptors.Provider { const nbCol = 4 - sort.Slice(providers, func(i, j int) bool { - return strings.ToLower(providers[i].Name) < strings.ToLower(providers[j].Name) + slices.SortFunc(providers, func(a, b descriptors.Provider) int { + return strings.Compare(strings.ToLower(a.Name), strings.ToLower(b.Name)) }) var matrix [][]descriptors.Provider