rsc / pdf

PDF reader
BSD 3-Clause "New" or "Revised" License
510 stars 327 forks source link

reader: add Close method #13

Open Shugyousha opened 7 years ago

Shugyousha commented 7 years ago

We use the library in a server and don't want to have file descriptors leaking.

The way I implemented it now changes the API so it may not be welcome. We could instead add a NewReaderAtCloser() (*ReaderAtCloser, error) function. The ReaderAtCloser could embed a Reader and thus offer the same functionality without changing the API for existing users.