code: func Matches(file string, patterns []string) (bool, error) {
  	pm, err := NewPatternMatcher(patterns)
  	if err != nil {
  		return false, err
  	}
  	file = filepath.Clean(file)
  
  	if file == "." {
  		// Don't let them exclude everything, kind of silly.
  		return false, nil
  	}
  
  	return pm.Matches(file)
  }
docs: // Matches returns true if file matches any of the patterns
  // and isn't excluded by any of the subsequent patterns.