@@ -229,7 +229,7 @@ func testMulticastAddrs(t *testing.T, ifmat []Addr) (nmaf4, nmaf6 int) {
229
229
}
230
230
231
231
func BenchmarkInterfaces (b * testing.B ) {
232
- testHookUninstaller .Do (func () { uninstallTestHooks () } )
232
+ testHookUninstaller .Do (uninstallTestHooks )
233
233
234
234
for i := 0 ; i < b .N ; i ++ {
235
235
if _ , err := Interfaces (); err != nil {
@@ -239,7 +239,7 @@ func BenchmarkInterfaces(b *testing.B) {
239
239
}
240
240
241
241
func BenchmarkInterfaceByIndex (b * testing.B ) {
242
- testHookUninstaller .Do (func () { uninstallTestHooks () } )
242
+ testHookUninstaller .Do (uninstallTestHooks )
243
243
244
244
ifi := loopbackInterface ()
245
245
if ifi == nil {
@@ -253,7 +253,7 @@ func BenchmarkInterfaceByIndex(b *testing.B) {
253
253
}
254
254
255
255
func BenchmarkInterfaceByName (b * testing.B ) {
256
- testHookUninstaller .Do (func () { uninstallTestHooks () } )
256
+ testHookUninstaller .Do (uninstallTestHooks )
257
257
258
258
ifi := loopbackInterface ()
259
259
if ifi == nil {
@@ -267,7 +267,7 @@ func BenchmarkInterfaceByName(b *testing.B) {
267
267
}
268
268
269
269
func BenchmarkInterfaceAddrs (b * testing.B ) {
270
- testHookUninstaller .Do (func () { uninstallTestHooks () } )
270
+ testHookUninstaller .Do (uninstallTestHooks )
271
271
272
272
for i := 0 ; i < b .N ; i ++ {
273
273
if _ , err := InterfaceAddrs (); err != nil {
@@ -277,7 +277,7 @@ func BenchmarkInterfaceAddrs(b *testing.B) {
277
277
}
278
278
279
279
func BenchmarkInterfacesAndAddrs (b * testing.B ) {
280
- testHookUninstaller .Do (func () { uninstallTestHooks () } )
280
+ testHookUninstaller .Do (uninstallTestHooks )
281
281
282
282
ifi := loopbackInterface ()
283
283
if ifi == nil {
@@ -291,7 +291,7 @@ func BenchmarkInterfacesAndAddrs(b *testing.B) {
291
291
}
292
292
293
293
func BenchmarkInterfacesAndMulticastAddrs (b * testing.B ) {
294
- testHookUninstaller .Do (func () { uninstallTestHooks () } )
294
+ testHookUninstaller .Do (uninstallTestHooks )
295
295
296
296
ifi := loopbackInterface ()
297
297
if ifi == nil {
0 commit comments