github.com/x04/go/src@v0.0.0-20200202162449-3d481ceb3525/net/internal/socktest/main_unix_test.go (about) 1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build !js,!plan9,!windows 6 7 package socktest_test 8 9 import "github.com/x04/go/src/syscall" 10 11 var ( 12 socketFunc func(int, int, int) (int, error) 13 closeFunc func(int) error 14 ) 15 16 func installTestHooks() { 17 socketFunc = sw.Socket 18 closeFunc = sw.Close 19 } 20 21 func uninstallTestHooks() { 22 socketFunc = syscall.Socket 23 closeFunc = syscall.Close 24 }