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
I think we should include a standard IO management for all the CLI commands. This might be able to be pulled into the core Lucky lib. I have built a few CLIs in Crystal now and I have been doing IO managment and think I have found a suitable pattern since there is no default CLI framework in Crystal.
I think we should have three methods accessible to the CLI commands input_io, data_io, and human_io. This makes it very easy to check input_tty? and only output the IO you actually need. This more conforms to UNIX style programs and lucky easier to use with other linux tools.
The text was updated successfully, but these errors were encountered:
I like that idea. We sort of started going that path. The main thing is when the CLI has any output, or specific errors, we need to be able to test that the output matches what we expect, or the errors contain the proper error message.
The other thing I'd like to do is unify the error messages for these. Like displaying the difference between UX error (i.e. "You must include X, but you did not"), and an exception (i.e. "Overload missing for Type Whatever"). These are sort of mixed right now.
I think we should include a standard IO management for all the CLI commands. This might be able to be pulled into the core Lucky lib. I have built a few CLIs in Crystal now and I have been doing IO managment and think I have found a suitable pattern since there is no default CLI framework in Crystal.
I think we should have three methods accessible to the CLI commands
input_io
,data_io
, andhuman_io
. This makes it very easy to checkinput_tty?
and only output the IO you actually need. This more conforms to UNIX style programs and lucky easier to use with other linux tools.The text was updated successfully, but these errors were encountered: