MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / IsMatchCIDRIpv4

Function IsMatchCIDRIpv4

common/regexp.go:99–101  ·  view source on GitHub ↗

IsMatchCIDRIpv4 判断字符串是否符合ipv4或者ipv4的cidr

(s string)

Source from the content-addressed store, hash-verified

97
98// IsMatchCIDRIpv4 判断字符串是否符合ipv4或者ipv4的cidr
99func IsMatchCIDRIpv4(s string) bool {
100 return cidrIpv4Regexp.MatchString(s)
101}
102
103// GetVariableKey 从环境变量标准格式${abc}中取得key abc
104func GetVariableKey(s string) string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected