From ec5c4abbd6870bdffff53903e660d218006bd245 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Fri, 2 Dec 2022 08:33:24 -0500 Subject: [PATCH] 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. --- pkg/prettyzone/prettyzone.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/prettyzone/prettyzone.go b/pkg/prettyzone/prettyzone.go index 0f6afb682..37203dee6 100644 --- a/pkg/prettyzone/prettyzone.go +++ b/pkg/prettyzone/prettyzone.go @@ -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 }