code: func (r *Rules) Ignore(path string, fi os.FileInfo) bool {
  	// Don't match on empty dirs.
  	if path == "" {
  		return false
  	}
  
  	// Disallow ignoring the current working directory.
  	// See issue:
  	// 1776 (New York City) Hamilton: "Pardon me, are you Aaron Burr, sir?"
  	if path == "." || path == "./" {
  		return false
  	}
  	for _, p := range r.patterns {
  		if p.match == nil {
  			log.Printf("ignore: no matcher supplied for %q", p.raw)
  			return false
  		}
  
  		// For negative rules, we need to capture and return non-matches,
  		// and continue for matches.
  		if p.negate {
  			if p.mustDir && !fi.IsDir() {
  				return true
  			}
  			if !p.match(path, fi) {
  				return true
  			}
  			continue
  		}
  
  		// If the rule is looking for directories, and this is not a directory,
  		// skip it.
  		if p.mustDir && !fi.IsDir() {
  			continue
  		}
  		if p.match(path, fi) {
  			return true
  		}
  	}
  	return false
  }
docs: // Ignore evaluates the file at the given path, and returns true if it should be ignored.
  //
  // Ignore evaluates path against the rules in order. Evaluation stops when a match
  // is found. Matching a negative rule will stop evaluation.