1 2 3 4 5 6 7 8 9 10 11 12 13
package file import "github.com/miekg/dns" // replaceWithAsteriskLabel replaces the left most label with '*'. func replaceWithAsteriskLabel(qname string) (wildcard string) { i, shot := dns.NextLabel(qname, 0) if shot { return "" } return "*." + qname[i:] }