func()

in pkg/admin/model/match.go [39:54]


func (m *AddressMatch) IsMatch(input string) bool {
	// FIXME depends on dubbo-go/common/MatchIpExpression()
	// if m.Cird != "" && input != "" || common.MatchIpExpression(m.Cird, input) {
	if m.Cird != "" && input != "" {
		return input == m.Cird
	} else if m.Wildcard != "" && input != "" {
		if constant.AnyHostValue == m.Wildcard || constant.AnyValue == m.Wildcard {
			return true
		}
		// FIXME depends on dubbo-go/common/IsMatchGlobPattern()
		// return common.IsMatchGlobPattern(m.Wildcard, input)
	} else if m.Exact != "" && input != "" {
		return input == m.Exact
	}
	return false
}