code: func (p *path) Match(path string, isdir bool) bool {
  	// are we expecting a directory
  	if p._directory && !isdir {
  		return false
  	}
  
  	if fnmatch.Match(p._fnmatch, path, fnmatch.FNM_PATHNAME) {
  		return true
  	} else if p._anchored {
  		return false
  	}
  
  	// match against the trailing path elements
  	return fnmatch.Match(p._fnmatch, path, fnmatch.FNM_PATHNAME)
  }
docs: // Match returns true if the given path matches the path pattern. If the
  // pattern is meant for directories only, and the path is not a directory,
  // Match will return false. The matching is performed by fnmatch()
  // with flags set to FNM_PATHNAME. It is assumed path is relative to the
  // base path of the owning GitIgnore.