xip

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIntranetIp

func GetIntranetIp() (ip string, err error)

GetIntranetIp retrieves and returns the first intranet ip of current machine.

func GetIntranetIpArray

func GetIntranetIpArray() (ips []string, err error)

GetIntranetIpArray retrieves and returns the intranet ip list of current machine.

func GetIpArray

func GetIpArray() (ips []string, err error)

GetIpArray retrieves and returns all the ip of current host.

func IsIntranet

func IsIntranet(ip string) bool

IsIntranet checks and returns whether given ip an intranet ip.

Local: 127.0.0.1 A: 10.0.0.0--10.255.255.255 B: 172.16.0.0--172.31.255.255 C: 192.168.0.0--192.168.255.255

func MustGetIntranetIp

func MustGetIntranetIp() string

MustGetIntranetIp performs as GetIntranetIp, but it panics if any error occurs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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