netutil

package
v12.41.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package netutil provides methods for working with network

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIP

func GetIP() string

GetIP returns main IPv4 address

Example
ip := GetIP()

if ip != "" {
	fmt.Printf("Your IP is %s\n", ip)
}
Output:

func GetIP6

func GetIP6() string

GetIP6 returns main IPv6 address

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL