func()

in runtime/router/trie.go [330:341]


func (t *tnode) isGetWildCardPattern(path string, keyIdx, pathIdx int, lastKeyCharSlash, lastPathCharSlash, colonAsPattern, isWhitelistedPath bool) bool {
	if isWhitelistedPath {
		// For whitelisted paths, it will treat as wild card pattern only if
		// 1. Param is the key is of type :var and
		// 2. Param is the path is of type :var or colonAsPattern is true
		return t.key[keyIdx] == ':' && lastKeyCharSlash && ((path[pathIdx] == ':' && lastPathCharSlash) || colonAsPattern)
	}
	// For normal paths, it will treat as wild card pattern only if
	// 1. Param is the key is of type :var or
	// 2. Param is the path is of type :var and colonAsPattern is true
	return (t.key[keyIdx] == ':' && lastKeyCharSlash) || (path[pathIdx] == ':' && lastPathCharSlash && colonAsPattern)
}