1
0
mirror of https://github.com/golang/go synced 2024-11-19 22:54:39 -07:00

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>
This commit is contained in:
Mikio Hara 2015-04-01 22:46:12 +09:00
parent f244a1471d
commit 3a9024b498
2 changed files with 6 additions and 6 deletions

View File

@ -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 {

View File

@ -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