Permalink
Browse files

list-wildcards flag

  • Loading branch information...
case committed Feb 10, 2019
1 parent a6298ea commit 3d1c80b1d63b6ef42fa3a3cb06d84c4924a470ee
Showing with 11 additions and 0 deletions.
  1. +11 −0 cmd/zonedb/main.go
@@ -31,6 +31,7 @@ func main() {
listZones := flag.Bool("list", false, "list working zones")
listTags := flag.Bool("list-tags", false, "list tags in working zones")
listLocations := flag.Bool("list-locations", false, "list locations in working zones")
listWildcards := flag.Bool("list-wildcards", false, "list zones with wildcarded DNS")

// Test operations
verifyNS := flag.Bool("verify-ns", false, "verify name servers")
@@ -262,6 +263,16 @@ func main() {
color.Fprintf(os.Stderr, "@{.}Locations: @{c}%s\n", strings.Join(locations.Values(), " "))
}

if *listWildcards {
zones := build.NewSet()
for _, z := range workZones {
if len(z.Wildcards) > 0 {
zones.Add(z.Domain)
}
}
color.Fprintf(os.Stderr, "@{.}Zones: @{c}%s\n", strings.Join(zones.Values(), " "))
}

if *infoURL != "" {
for _, z := range workZones {
z.InfoURL = *infoURL

0 comments on commit 3d1c80b

Please sign in to comment.