Commit c928dbd7 authored by Christian Muehlhaeuser's avatar Christian Muehlhaeuser Committed by Miek Gieben

Added comment why ominous assignment is required (#3021)

parent d0c92544
......@@ -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
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment