mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-12 08:04:28 +08:00
Fix ListZones output for all
query on get-zones
This commit is contained in:
parent
a2fd3be532
commit
7d73245e4f
1 changed files with 6 additions and 3 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"net/http"
|
||||
"net/http/cookiejar"
|
||||
"net/url"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -120,12 +121,14 @@ func (c *ApiClient) ListZones() ([]string, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// Get the list of the domains
|
||||
domains := make([]string, 0, len(domainsMap))
|
||||
for _, key := range domains {
|
||||
domains = append(domains, key)
|
||||
for domain := range domainsMap {
|
||||
domains = append(domains, domain)
|
||||
}
|
||||
|
||||
// Ensure the order is deterministic
|
||||
sort.Strings(domains)
|
||||
|
||||
return domains, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue