code: func NewWithErrors(file string, errors func(Error) bool) GitIgnore {
  	var _err error
  
  	// do we have an error handler?
  	_file := file
  	_errors := errors
  	if _errors == nil {
  		_errors = func(e Error) bool { return true }
  	} else {
  		// augment the error handler to include the .gitignore file name
  		//		- we do this here since the parser and lexer interfaces are
  		//		  not aware of file names
  		_errors = func(e Error) bool {
  			// augment the position with the file name
  			_position := e.Position()
  			_position.File = _file
  
  			// create a new error with the updated Position
  			_error := NewError(e.Underlying(), _position)
  
  			// invoke the original error handler
  			return errors(_error)
  		}
  	}
  
  	// we need the absolute path for the GitIgnore base
  	_file, _err = filepath.Abs(file)
  	if _err != nil {
  		_errors(NewError(_err, Position{}))
  		return nil
  	}
  	_base := filepath.Dir(_file)
  
  	// attempt to open the ignore file to create the io.Reader
  	_fh, _err := os.Open(_file)
  	if _err != nil {
  		_errors(NewError(_err, Position{}))
  		return nil
  	}
  
  	// return the GitIgnore instance
  	return New(_fh, _base, _errors)
  }
docs: // NewWithErrors creates a GitIgnore instance from the given file.
  // 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. NewWithErrors returns nil if the .gitignore could not be read.