Part of being able to add more unit tests for issue https://github.com/dispatchrun/dispatch/issues/58 and run them concurrently involves removing/reducing the number of shared global dependencies.
Solution
We could do this by avoiding a command's logic from calling global variables directly and instead pass them a copy to a command's constructor in the cli.Main.
Problem
Part of being able to add more unit tests for issue https://github.com/dispatchrun/dispatch/issues/58 and run them concurrently involves removing/reducing the number of shared global dependencies.
Solution
We could do this by avoiding a command's logic from calling global variables directly and instead pass them a copy to a command's constructor in the
cli.Main
.Here is an example for the switch command: https://github.com/dispatchrun/dispatch/pull/60