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
As a developer, I would like to use the scaffolding provided by the subscribe module and run my own code instead of printing the message.
There are a number of ways to accomplish this. Here are two examples::
factor the code out of _main into a new function, say guts, and have _main and a new function named, say subscribe call guts with a callback function. _main could use print_message as the callback
Add a callback argument to _main that defaults to print_message.
Definition of Done
A test program is written that defines a callback and ensures that the callback is called.
The text was updated successfully, but these errors were encountered:
@myNameIsPatrick I guess I haven't looked at the code since July. It looks like most of the details are now buried in the io.Stream class so I agree that there is no point to this and it can be closed.
Description
As a developer, I would like to use the scaffolding provided by the subscribe module and run my own code instead of printing the message.
There are a number of ways to accomplish this. Here are two examples::
factor the code out of _main into a new function, say
guts
, and have_main
and a new function named, saysubscribe
callguts
with a callback function._main
could useprint_message
as the callbackAdd a callback argument to
_main
that defaults toprint_message
.Definition of Done
A test program is written that defines a callback and ensures that the callback is called.
The text was updated successfully, but these errors were encountered: