add document for temporary API:DNSResolverFunc, DNSResolverFunc

This commit is contained in:
Shelikhoo 2021-05-04 22:25:37 +01:00
parent 2129c6e1e9
commit 00a4551637
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
1 changed files with 6 additions and 1 deletions

View File

@ -3,14 +3,19 @@
package internet
import (
"context"
"net"
)
const SystemDNS = "8.8.8.8:53"
/* DNSResolverFunc
This is a temporary API and is subject to removal at any time.
*/
type DNSResolverFunc func() *net.Resolver
/* NewDNSResolver
This is a temporary API and is subject to removal at any time.
*/
var NewDNSResolver DNSResolverFunc = func() *net.Resolver {
return &net.Resolver{
PreferGo: true,