You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using commands.IO, gnoland should use a logger. The main purpose of gnoland is to log information, not to interact with stdin or write raw stdout/stderr. Using a logger is more suitable and allows for clear unit tests without the need for monkey patching.
For other binaries, particularly CLI tools, we should assess whether the logger should be used more extensively in place of commands.IO. Alternatively, we can explore the option of commands.IO incorporating the logger or simply passing both more frequently.
Bonus: The gnoland binary should not have access to os.Stdin. We can use build tags to configure os.Stdin as a noop reader.
Thanks to @piux2 for highlighting the need for this change.
The text was updated successfully, but these errors were encountered:
Context: #999 (comment)
commands.IO
,gnoland
should use a logger. The main purpose ofgnoland
is to log information, not to interact with stdin or write raw stdout/stderr. Using a logger is more suitable and allows for clear unit tests without the need for monkey patching.commands.IO
. Alternatively, we can explore the option ofcommands.IO
incorporating the logger or simply passing both more frequently.gnoland
binary should not have access toos.Stdin
. We can use build tags to configureos.Stdin
as a noop reader.Thanks to @piux2 for highlighting the need for this change.
The text was updated successfully, but these errors were encountered: