bobappleyard/readline — pull request #5 by knuesel (2012-10-06 14:16:56+00:00)
Title: Cleanup() and informative errors using syscall.Errno

I had a corrupted terminal when catching SIGINT and exiting during a readline.String(). One of these patches solves this by adding a Cleanup() function which can be called in such cases (see included example).

Another patch makes the history functions return more useful errors by casting the errno to syscall.Errno, which implements an Error() function that gives a textual representation of the error.

I also renamed Reader() to NewReader() as it seems more idiomatic. I'd like to add an example for this one too but I'm not sure what is the intended use of it.