aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar coredns[bot] <bot@bot.coredns.io> 2021-10-11 10:28:01 +0000
committerGravatar coredns[bot] <bot@bot.coredns.io> 2021-10-11 10:28:01 +0000
commit5b65a58d4883e91312fcb79911f71eb5a5993b47 (patch)
treef8b95ae091bd473088fe07bbca17edf019f315f7
parent0f5e7bdfb3264204c3726324bea98e590cc16de8 (diff)
downloadcoredns-5b65a58d4883e91312fcb79911f71eb5a5993b47.tar.gz
coredns-5b65a58d4883e91312fcb79911f71eb5a5993b47.tar.zst
coredns-5b65a58d4883e91312fcb79911f71eb5a5993b47.zip
auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
-rw-r--r--plugin/forward/connect.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/forward/connect.go b/plugin/forward/connect.go
index 164ac89a0..3d53044e5 100644
--- a/plugin/forward/connect.go
+++ b/plugin/forward/connect.go
@@ -100,7 +100,7 @@ func (p *Proxy) Connect(ctx context.Context, state request.Request, opts options
// records the origin Id before upstream.
originId := state.Req.Id
state.Req.Id = dns.Id()
- defer func(){
+ defer func() {
state.Req.Id = originId
}()
@@ -122,7 +122,7 @@ func (p *Proxy) Connect(ctx context.Context, state request.Request, opts options
return nil, ErrCachedClosed
}
// recovery the origin Id after upstream.
- if ret != nil{
+ if ret != nil {
ret.Id = originId
}
return ret, err