aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Christian Muehlhaeuser <muesli@gmail.com> 2019-07-19 08:31:29 +0200
committerGravatar Miek Gieben <miek@miek.nl> 2019-07-19 06:31:29 +0000
commitc928dbd754243f55c19c122ccafe7709c041bf4c (patch)
treec7c175a8c28c0d21f8b3645115a099d35fdbfba7
parentd0c92544097b0dbaaf47d2622ddc80ea11ea3f4e (diff)
downloadcoredns-c928dbd754243f55c19c122ccafe7709c041bf4c.tar.gz
coredns-c928dbd754243f55c19c122ccafe7709c041bf4c.tar.zst
coredns-c928dbd754243f55c19c122ccafe7709c041bf4c.zip
Added comment why ominous assignment is required (#3021)
-rw-r--r--plugin/etcd/msg/service_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugin/etcd/msg/service_test.go b/plugin/etcd/msg/service_test.go
index 24bea47f6..a5038ac2c 100644
--- a/plugin/etcd/msg/service_test.go
+++ b/plugin/etcd/msg/service_test.go
@@ -128,6 +128,7 @@ func BenchmarkNewSRV(b *testing.B) {
s := &Service{Host: "www,example.org", Port: 8080}
for n := 0; n < b.N; n++ {
srv := s.NewSRV("www.example.org.", 16)
+ // this assignment makes sure s.NewSRV doesn't get optimized out
srv = srv
}
}