1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

BUGFIX: PrettySort helper doesn't sort (#1838)

PrettySort doesn't call sort! Luckily the only code that calls this is the "get-zones" subcommand, and nobody noticed that the output isn't sorted.

By making this change, people using "get-zones" to make their initial dnsconfig.js file will now find that their draft D() code is a little prettier.
This commit is contained in:
Tom Limoncelli
2022-12-02 08:33:24 -05:00
committed by GitHub
parent 5b95c099f6
commit ec5c4abbd6

View File

@ -90,6 +90,7 @@ func PrettySort(records models.Records, origin string, defaultTTL uint32, commen
}
z.Records = nil
z.Records = append(z.Records, records...)
sort.Sort(z)
return z
}