net

package
v0.0.0-...-7d57428 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPsSplitV4V6

func IPsSplitV4V6(ips []string) (ipv4 []string, ipv6 []string)

IPsSplitV4V6 returns two slice of ipv4 and ipv6 string slice.

func IsIPv4Address

func IsIPv4Address(ip string) bool

IsIPv4Address returns if ip is IPv4.

func IsIPv6Address

func IsIPv6Address(ip string) bool

IsIPv6Address returns if ip is IPv6.

func IsRequestFromLocalhost

func IsRequestFromLocalhost(r *http.Request) bool

IsRequestFromLocalhost returns true if request is from localhost address.

func IsValidIPAddress

func IsValidIPAddress(ip string) bool

IsValidIPAddress Tell whether the given IP address is valid or not

func ParseIPsSplitToV4V6

func ParseIPsSplitToV4V6(ips []string) (ipv4 []netip.Addr, ipv6 []netip.Addr)

ParseIPsSplitToV4V6 returns two slice of ipv4 and ipv6 netip.Addr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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