func TestableNetwork(network string) bool {
	switch network {
	case "unix", "unixgram":
		switch runtime.GOOS {
		case "android", "js", "nacl", "plan9", "windows":
			return false
		}
		if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
			return false
		}
	case "unixpacket":
		switch runtime.GOOS {
		case "aix", "android", "darwin", "freebsd", "js", "nacl", "plan9", "windows":
			return false
		case "netbsd":
			if runtime.GOARCH == "386" {
				return false
			}
		}
	}
	return true
}
TestableNetwork reports whether network is testable on the current
platform configuration.
package nettest  
import (
	"fmt"
	"io/ioutil"
	"net"
	"os"
	"runtime"
)
var (
	supportsIPv4 bool
	supportsIPv6 bool
)
func init() {
	if ln, err := net.Listen("tcp4", "127.0.0.1:0"); err == nil {
		ln.Close()
		supportsIPv4 = true
	}
	if ln, err := net.Listen("tcp6", "[::1]:0"); err == nil {
		ln.Close()
		supportsIPv6 = true
	}
}
func SupportsIPv4() bool { return supportsIPv4 }
func SupportsIPv6() bool { return supportsIPv6 }
func SupportsRawIPSocket() (string, bool) {
	return supportsRawIPSocket()
}
func SupportsIPv6MulticastDeliveryOnLoopback() bool {
	return supportsIPv6MulticastDeliveryOnLoopback()
}
func ProtocolNotSupported(err error) bool {
	return protocolNotSupported(err)
}