2024-12-03 01:11:08 +03:00
|
|
|
package dns
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestCache(t *testing.T) {
|
|
|
|
net.DefaultResolver = NewNetResolver(PreferIPV4(true))
|
|
|
|
|
|
|
|
addrs, err := net.LookupHost("unistack.org")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2024-12-09 00:41:08 +03:00
|
|
|
|
|
|
|
addrs, err = net.LookupHost("unistack.org")
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
_ = addrs
|
2024-12-03 01:11:08 +03:00
|
|
|
}
|