golang/go

net: Lookup does not support Android/ios

Open

#34,024 opened on Sep 2, 2019

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Go (19,008 forks)batch import
NeedsInvestigationhelp wantedmobile

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

package main
 
import (
  "fmt"
  "net"
)
 
func main() {
  txtrecords, _ := net.LookupTXT("facebook.com")
 
  for _, txt := range txtrecords {
    fmt.Println(txt)
  }
}

lookup facebook.com on [::1]:53: read udp [::1]:57440->[::1]:53: read: connection refused

android There is no /etc/resolv.conf file.

Contributor guide