Documentation ¶
Index ¶
- Variables
- func Contains[T comparable](slice []T, element T) bool
- func DelayedRetry(f func() error, maxRetries int, delay time.Duration) error
- func HasDuplicates(valSlice []string) (string, bool)
- func IsURL(val interface{}) error
- func MapKeys[K comparable, V any](m map[K]V) []K
- func MatchNoPorxyRE(noProxyValues []string) error
- func SliceToSortedString(s []string) string
- func SortStringRespectLength(s []string)
- func ValidateAdditionalTrustBundle(val interface{}) error
- func ValidateHTTPProxy(val interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var UserNoProxyRE = regexp.MustCompile(`^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(3[0-2]|[1-2][0-9]|[0-9]))$|^(.?[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$|^""$`)
the following regex defines four different patterns: first pattern is to validate IPv4 address second,is for IPv4 CIDR range validation third pattern is to validate domains and the fourth petterrn is to be able to remove the existing no-proxy value by typing empty string (""). nolint
Functions ¶
func Contains ¶ added in v0.1.73
func Contains[T comparable](slice []T, element T) bool
func DelayedRetry ¶ added in v0.1.76
func HasDuplicates ¶ added in v0.1.65
func IsURL ¶
func IsURL(val interface{}) error
IsURL validates whether the given value is a valid URL
func MapKeys ¶ added in v0.1.74
func MapKeys[K comparable, V any](m map[K]V) []K
func MatchNoPorxyRE ¶ added in v0.1.65
func SliceToSortedString ¶ added in v0.1.73
func SortStringRespectLength ¶ added in v0.1.73
func SortStringRespectLength(s []string)
func ValidateAdditionalTrustBundle ¶
func ValidateAdditionalTrustBundle(val interface{}) error
func ValidateHTTPProxy ¶
func ValidateHTTPProxy(val interface{}) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.