code: func (gi *GitIgnore) MatchesPath(f string) bool {
  	// Replace OS-specific path separator.
  	f = strings.Replace(f, string(os.PathSeparator), "/", -1)
  
  	matchesPath := false
  	for _, ip := range gi.patterns {
  		if ip.pattern.MatchString(f) {
  			// If this is a regular target (not negated with a gitignore exclude "!" etc)
  			if !ip.negate {
  				matchesPath = true
  			} else if matchesPath {
  				// Negated pattern, and matchesPath is already set
  				matchesPath = false
  			}
  		}
  	}
  	return matchesPath
  }
docs: ////////////////////////////////////////////////////////////
  // MatchesPath returns true if the given GitIgnore structure would target
  // a given path string `f`.