aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/lookup_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/lookup_unix.go')
-rw-r--r--libgo/go/net/lookup_unix.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/libgo/go/net/lookup_unix.go b/libgo/go/net/lookup_unix.go
index d500a12..fa98eed 100644
--- a/libgo/go/net/lookup_unix.go
+++ b/libgo/go/net/lookup_unix.go
@@ -119,6 +119,19 @@ func lookupMX(name string) (mx []*MX, err error) {
return
}
+func lookupNS(name string) (ns []*NS, err error) {
+ _, records, err := lookup(name, dnsTypeNS)
+ if err != nil {
+ return
+ }
+ ns = make([]*NS, len(records))
+ for i, r := range records {
+ r := r.(*dnsRR_NS)
+ ns[i] = &NS{r.Ns}
+ }
+ return
+}
+
func lookupTXT(name string) (txt []string, err error) {
_, records, err := lookup(name, dnsTypeTXT)
if err != nil {