net/dns: move mutex before the field it guards

And some misc doc tweaks for idiomatic Go style.

Updates #cleanup

Change-Id: I3ca45f78aaca037f433538b847fd6a9571a2d918
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2024-06-25 12:21:32 -07:00
committed by Brad Fitzpatrick
parent 94defc4056
commit 9766f0e110
3 changed files with 14 additions and 10 deletions

View File

@ -212,7 +212,9 @@ type forwarder struct {
// resolver lookup.
cloudHostFallback []resolverAndDelay
// To be called when a SERVFAIL is returned due to missing upstream resolvers.
// missingUpstreamRecovery, if non-nil, is set called when a SERVFAIL is
// returned due to missing upstream resolvers.
//
// This should attempt to properly (re)set the upstream resolvers.
missingUpstreamRecovery func()
}