code: func pathMatches(path, spec string) bool {
  	// Allow wildcard match
  	if spec == "*" {
  		return true
  	}
  	// Allow exact match
  	if spec == path {
  		return true
  	}
  	// Allow a trailing * subpath match
  	if strings.HasSuffix(spec, "*") && strings.HasPrefix(path, strings.TrimRight(spec, "*")) {
  		return true
  	}
  	return false
  }
docs: // Check whether the path matches the path specification.