()
| 262 | } |
| 263 | |
| 264 | func (r *Resolver) getConfig() *dns.ClientConfig { |
| 265 | r.mtx.RLock() |
| 266 | defer r.mtx.RUnlock() |
| 267 | |
| 268 | return &dns.ClientConfig{ |
| 269 | Servers: r.conf.Servers, |
| 270 | Search: r.conf.Search, |
| 271 | Port: r.conf.Port, |
| 272 | Ndots: r.conf.Ndots, |
| 273 | Timeout: r.conf.Timeout, |
| 274 | Attempts: r.conf.Attempts, |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | // defaultClientConfig returns Default values if resolv.conf can't be loaded, picked based on values from `man 5 resolv.conf` |
| 279 | func defaultClientConfig() *dns.ClientConfig { |
no outgoing calls