iputils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDomain

func CheckDomain(domain string) bool

CheckDomain returns if the domain is valid.

func CheckIP

func CheckIP(i string) bool

func CompareIP

func CompareIP(v1, v2 string) (int, error)

func Contains

func Contains(sub, s string) (bool, error)

func GetDiffHosts

func GetDiffHosts(hostsOld, hostsNew []string) (add, sub []string)

func GetHostIP

func GetHostIP(host string) string

use only one

func GetHostIPAndPortOrDefault

func GetHostIPAndPortOrDefault(host, Default string) (string, string)

func GetHostIPAndPortSlice

func GetHostIPAndPortSlice(hosts []string, Default string) (res []string)

func GetHostIPSlice

func GetHostIPSlice(hosts []string) (res []string)

func GetHostIPs

func GetHostIPs(hosts []string) []string

func GetSSHHostIPAndPort

func GetSSHHostIPAndPort(host string) (string, string)

func IPToInt

func IPToInt(v string) *big.Int

func IsIPv6

func IsIPv6(netIP net.IP) bool

IsIPv6 returns if netIP is IPv6.

func IsIpv4

func IsIpv4(ip string) bool

IsIpv4 returns if netIP is IPv4.

func IsLocalIP

func IsLocalIP(ip string, addrs *[]net.Addr) bool

func ListLocalHostAddrs

func ListLocalHostAddrs() (*[]net.Addr, error)

func LocalIP

func LocalIP(addrs *[]net.Addr) string

func NextIP

func NextIP(ip string) net.IP

func ParseIPList

func ParseIPList(s string) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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