func allResolvers(t *testing.T, f func(t *testing.T)) { … } // forceGoDNS forces the resolver configuration to use the pure Go resolver // and returns a fixup function to restore the old settings. func forceGoDNS() func() { … } // forceCgoDNS forces the resolver configuration to use the cgo resolver // and returns a fixup function to restore the old settings. func forceCgoDNS() func() { … } func TestForceCgoDNS(t *testing.T) { … } func TestForceGoDNS(t *testing.T) { … }