Documentation
¶
Overview ¶
Package netutil provide some network util functions.
Index ¶
- func AllLocalIPv4() ([]string, error)
- func AllMacAddrs() ([]string, error)
- func FirstMacAddr() (string, error)
- func FreePort() (port int, err error)
- func GetLocalIPs() (ips []string)
- func HostIP() ([]string, error)
- func IPv4() string
- func IPv6() string
- func IncrIP(ip net.IP)
- func InternalIP() string
- func InternalIPv4() string
- func InternalIPv6() string
- func MustIPv4() (ip string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllLocalIPv4 ¶ added in v0.7.4
AllLocalIPv4 Get all non-loop IPv4 addresses. 获取所有非回环 IPv4 地址
func AllMacAddrs ¶ added in v0.7.4
AllMacAddrs get all mac addresses
func FirstMacAddr ¶ added in v0.7.4
FirstMacAddr 获取第一个非lo网卡的MAC地址
func GetLocalIPs ¶ added in v0.6.10
func GetLocalIPs() (ips []string)
GetLocalIPs get local IPs(ipv4+ipv6), will panic on error.
func InternalIPv4 ¶ added in v0.5.0
func InternalIPv4() string
InternalIPv4 get internal IPv4 for host.
func InternalIPv6 ¶ added in v0.5.0
func InternalIPv6() string
InternalIPv6 get first internal IPv6 addr
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package httpctype list some common http content-type
|
Package httpctype list some common http content-type |
|
Package httpheader provides some common http header names.
|
Package httpheader provides some common http header names. |
|
Package httpreq provide an simple http requester and some useful util functions.
|
Package httpreq provide an simple http requester and some useful util functions. |
Click to show internal directories.
Click to hide internal directories.