manifoldco / promptui

Interactive prompt for command-line applications
https://www.manifold.co
BSD 3-Clause "New" or "Revised" License
6.03k stars 333 forks source link

Stdout should be `io.Writer` instead of `io.WriterCloser` #211

Open mbalsam82 opened 1 year ago

mbalsam82 commented 1 year ago

As far as I can see, it is only used in the readline.Config which expects io.Writer, not io.WriterCloser (see here). p.Stdout.Close() is never called.

It's a bit inconvenient that when I want to configure an io.Writer as Stdout, I always need to wrap it in a struct that implements an unnecessary, no-op Close() function.