MCPcopy Index your code
hub / github.com/caddyserver/certmagic / RecursiveNameservers

Function RecursiveNameservers

dnsutil.go:353–363  ·  view source on GitHub ↗

RecursiveNameservers are used to pre-check DNS propagation. It picks user-configured nameservers (custom) OR the defaults obtained from resolv.conf and defaultNameservers if none is configured and ensures that all server addresses have a port value. EXPERIMENTAL: This API was previously unexported,

(custom []string)

Source from the content-addressed store, hash-verified

351// EXPERIMENTAL: This API was previously unexported, and may be
352// be unexported again in the future. Do not rely on it at this time.
353func RecursiveNameservers(custom []string) []string {
354 var servers []string
355 if len(custom) == 0 {
356 servers = systemOrDefaultNameservers(defaultResolvConf, defaultNameservers)
357 } else {
358 servers = make([]string, len(custom))
359 copy(servers, custom)
360 }
361 populateNameserverPorts(servers)
362 return servers
363}
364
365var defaultNameservers = []string{
366 "8.8.8.8:53",

Callers 6

createRecordMethod · 0.85
waitMethod · 0.85
TestLookupNameserversOKFunction · 0.85
dnsutil_test.goFile · 0.85

Calls 2

populateNameserverPortsFunction · 0.85

Tested by 3

TestLookupNameserversOKFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…