Commit 3a9024b4 authored by Mikio Hara's avatar Mikio Hara

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/8391Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent f244a147
......@@ -26,12 +26,6 @@ var (
supportsIPv4map bool
)
func init() {
sysInit()
supportsIPv4 = probeIPv4Stack()
supportsIPv6, supportsIPv4map = probeIPv6Stack()
}
// A netaddr represents a network endpoint address or a list of
// network endpoint addresses.
type netaddr interface {
......
......@@ -46,6 +46,12 @@ import (
"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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment