utils

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopyStringSlice added in v0.5.0

func DeepCopyStringSlice(in []string) []string

func DeepEqualStringSlice added in v0.4.0

func DeepEqualStringSlice(a []string, b []string) bool

func Intersect added in v0.3.0

func Intersect(rangeA *networkingv1.AddressRange, rangeB *networkingv1.AddressRange) bool

Intersect returns if ip address range of rangeA is overlapped with rangeB.

func LastIP added in v0.3.0

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

LastIP Determine the last IP of a subnet, excluding the broadcast if IPv4

func NormalizedIP

func NormalizedIP(ip string) string

NormalizedIP If IP is valid, return itself otherwise empty string

func ParseBoolOrDefault

func ParseBoolOrDefault(in string, defaultValue bool) bool

func PickFirstNonEmptyString

func PickFirstNonEmptyString(ss ...string) string

func StringSliceToMap

func StringSliceToMap(in []string) (out map[string]struct{})

func StringToIPNet

func StringToIPNet(in string) *net.IPNet

func ToDNSFormat added in v0.5.0

func ToDNSFormat(ip net.IP) string

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