code: func (g *Group) findRule(path string) (ret *rule) {
  	var prefixLen int
  
  	for _, r := range g.rules {
  		if r.pattern != nil {
  			if r.pattern.MatchString(path) {
  				// Consider this a match equal to the length of the pattern.
  				// From Google's spec:
  				// The order of precedence for rules with wildcards is undefined.
  				if l := len(r.pattern.String()); l > prefixLen {
  					prefixLen = len(r.pattern.String())
  					ret = r
  				}
  			}
  		} else if r.path == "/" && prefixLen == 0 {
  			// Weakest match possible
  			prefixLen = 1
  			ret = r
  		} else if strings.HasPrefix(path, r.path) {
  			if l := len(r.path); l > prefixLen {
  				prefixLen = l
  				ret = r
  			}
  		}
  	}
  	return
  }
docs: // From Google's spec:
  // The path value is used as a basis to determine whether or not a rule applies
  // to a specific URL on a site. With the exception of wildcards, the path is
  // used to match the beginning of a URL (and any valid URLs that start with the
  // same path).
  //
  // At a group-member level, in particular for allow and disallow directives,
  // the most specific rule based on the length of the [path] entry will trump
  // the less specific (shorter) rule. The order of precedence for rules with
  // wildcards is undefined.