github.com/nxtrace/NTrace-core@v1.3.1-0.20240513132635-39169291e8c9/util/dns_test.go (about) 1 package util 2 3 import ( 4 "context" 5 "fmt" 6 "testing" 7 ) 8 9 func TestDNS(t *testing.T) { 10 resolver := DNSSB() 11 ips, _ := resolver.LookupHost(context.Background(), "www.bing.com") 12 fmt.Println(ips) 13 } 14 15 func TestDomainLookUp(t *testing.T) { 16 ips, _ := DomainLookUp("pek-4134.endpoint.nxtrace.org.", "all", "", false) 17 fmt.Println(ips) 18 ips, _ = DomainLookUp("pek-4134.endpoint.nxtrace.org.", "4", "", false) 19 fmt.Println(ips) 20 }