mirror of
https://github.com/coredns/coredns.git
synced 2025-10-07 13:31:02 +02:00
Added comment why ominous assignment is required (#3021)
This commit is contained in:
parent
d0c9254409
commit
c928dbd754
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user