utils

package
v0.0.0-...-d66a22c Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CIDRToIP

func CIDRToIP(cidr string) (IPs []net.IP)

func FirstIP

func FirstIP(network *net.IPNet) net.IP

func GetInputType

func GetInputType(input string) int

func GetItemInArray

func GetItemInArray(a []string, s string) int

func IsCIDR

func IsCIDR(str string) bool

IsCIDR checks if the string is an valid CIDR notation (IPV4)

func IsDomain

func IsDomain(str string) bool

func IsDomainPort

func IsDomainPort(str string) bool

IsDomainPort checks if a string is Domain:Port

func IsFileNameValid

func IsFileNameValid(name string) bool

func IsHostPath

func IsHostPath(str string) bool

IsHostPath checks if a string is : netloc/path netloc:port/path

func IsIPPort

func IsIPPort(str string) bool

func IsIPRange

func IsIPRange(str string) bool

func IsIPv4

func IsIPv4(str string) bool

IsIPv4 IsIP checks if a string is either IP version 4 Alias for `net.ParseIP`

func IsIPv6

func IsIPv6(str string) bool

IsIPv6 IsIP checks if a string is either IP version 4 Alias for `net.ParseIP`

func IsLocalIP

func IsLocalIP(input string) bool

func IsNetloc

func IsNetloc(str string) bool

func IsNetlocPort

func IsNetlocPort(str string) bool

IsNetlocPort checks if a string is [Domain or IP]:Port

func IsPort

func IsPort(str string) bool

IsPort checks if a string represents a valid port

func IsProtocol

func IsProtocol(str string) bool

func IsURL

func IsURL(str string) bool

IsURL checks if a string is : protocol://netloc/path protocol://netloc:port/path

func LastIP

func LastIP(network *net.IPNet) net.IP

func RangerToIP

func RangerToIP(ranger string) (IPs []net.IP)

func RemoveDuplicateElement

func RemoveDuplicateElement(input []string) []string

func RemoveDuplicateElementInt

func RemoveDuplicateElementInt(input []int) []int

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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