net: move init function into net.go
It's a single, package-wide init function specified for the net package.
Change-Id: Id5894d65e1a92297cc16803cc5e4d4eef0b4b099
Reviewed-on: https://go-review.googlesource.com/8391
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/src/net/net.go b/src/net/net.go
index 339c972..3b06e6b 100644
--- a/src/net/net.go
+++ b/src/net/net.go
@@ -46,6 +46,12 @@
"time"
)
+func init() {
+ sysInit()
+ supportsIPv4 = probeIPv4Stack()
+ supportsIPv6, supportsIPv4map = probeIPv6Stack()
+}
+
// Addr represents a network end point address.
type Addr interface {
Network() string // name of the network