mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
get-zones now outputs END); notation and prettier whitespace (#2849)
This commit is contained in:
@@ -220,7 +220,7 @@ func GetZone(args GetZoneArgs) error {
|
||||
fmt.Fprintf(w, `var %s = NewDnsProvider("%s", "%s");`+"\n",
|
||||
dspVariableName, args.CredName, args.ProviderName)
|
||||
}
|
||||
fmt.Fprintf(w, `var REG_CHANGEME = NewRegistrar("none");`+"\n")
|
||||
fmt.Fprintf(w, `var REG_CHANGEME = NewRegistrar("none");`+"\n\n")
|
||||
}
|
||||
|
||||
// print each zone
|
||||
@@ -267,14 +267,17 @@ func GetZone(args GetZoneArgs) error {
|
||||
"//, NOTE: CNAME at apex may require manual editing.",
|
||||
"// NOTE: CNAME at apex may require manual editing.",
|
||||
)
|
||||
fmt.Fprint(w, out)
|
||||
fmt.Fprint(w, "\n)\n\n")
|
||||
} else {
|
||||
out = out + ","
|
||||
out = strings.ReplaceAll(out,
|
||||
"// NOTE: CNAME at apex may require manual editing.,",
|
||||
"// NOTE: CNAME at apex may require manual editing.",
|
||||
)
|
||||
fmt.Fprint(w, out)
|
||||
fmt.Fprint(w, "\nEND);\n\n")
|
||||
}
|
||||
fmt.Fprint(w, out)
|
||||
fmt.Fprint(w, "\n)\n")
|
||||
|
||||
case "tsv":
|
||||
for _, rec := range recs {
|
||||
|
||||
Reference in New Issue
Block a user