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)
| 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. |
| 353 | func 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 | |
| 365 | var defaultNameservers = []string{ |
| 366 | "8.8.8.8:53", |
searching dependent graphs…