utils

package
v3.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIPv4Addr

func GetIPv4Addr(conf *config.NetIPConfig) (result string, err error)

GetIPv4Addr 获得IPv4地址

func GetIPv6Addr

func GetIPv6Addr(conf *config.NetIPConfig) (result string, err error)

GetIPv6Addr 获得IPv6地址

func GetNetInterface

func GetNetInterface(interfaceName string) (ipv4NetInterfaces []NetInterface, ipv6NetInterfaces []NetInterface, err error)

GetNetInterface 获得网卡地址 (返回ipv4, ipv6地址)

Types

type NetInterface

type NetInterface struct {
	Name    string
	Address []string
}

NetInterface 本机网络

Jump to

Keyboard shortcuts

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