code: func New(r io.Reader, base string, errors func(Error) bool) GitIgnore {
  	// do we have an error handler?
  	_errors := errors
  	if _errors == nil {
  		_errors = func(e Error) bool { return true }
  	}
  
  	// extract the patterns from the reader
  	_parser := NewParser(r, _errors)
  	_patterns := _parser.Parse()
  
  	return &ignore{_base: base, _pattern: _patterns, _errors: _errors}
  }
docs: // NewGitIgnore creates a new GitIgnore instance from the patterns listed in t,
  // representing a .gitignore file in the base directory. If errors is given, it
  // will be invoked for every error encountered when parsing the .gitignore
  // patterns. Parsing will terminate if errors is called and returns false,
  // otherwise, parsing will continue until end of file has been reached.