Instead of the Sleep function pointer being a standalong global variable, move it into a new Time struct, and add a Now function pointer, so that time.Now() can be mocked. Time.Now() isn't used yet. This will be cleaner if we need to mock more time-related functions in the future. |
||
---|---|---|
.. | ||
root.go | ||
root_test.go | ||
version.go |