package
Version:
v12.39.1+incompatible
Opens a new window with list of versions in this module.
Published: Jan 9, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package netutil provides methods for working with network
GetIP returns main IPv4 address
ip := GetIP()
if ip != "" {
fmt.Printf("Your IP is %s\n", ip)
}
Output:
GetIP6 returns main IPv6 address
Source Files
¶
Click to show internal directories.
Click to hide internal directories.