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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}