code: func (fs *FileSorter) Close() error {
  	if fs.closed {
  		return errors.New("FileSorter has been closed")
  	}
  	fs.buf = fs.buf[:0]
  	err := fs.closeAllFiles()
  	if err != nil {
  		return errors.Trace(err)
  	}
  	fs.closed = true
  	return nil
  }
docs: // Close terminates the input or output process and discards all remaining data.