diff options
author | 2019-07-19 08:31:29 +0200 | |
---|---|---|
committer | 2019-07-19 06:31:29 +0000 | |
commit | c928dbd754243f55c19c122ccafe7709c041bf4c (patch) | |
tree | c7c175a8c28c0d21f8b3645115a099d35fdbfba7 | |
parent | d0c92544097b0dbaaf47d2622ddc80ea11ea3f4e (diff) | |
download | coredns-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.go | 1 |
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 } } |