SetClock sets the clock used for time-dependent operations. Must be called before Command() to take effect.
(clk quartz.Clock)
| 595 | // SetClock sets the clock used for time-dependent operations. |
| 596 | // Must be called before Command() to take effect. |
| 597 | func (r *RootCmd) SetClock(clk quartz.Clock) { |
| 598 | r.clock = clk |
| 599 | } |
| 600 | |
| 601 | // ensureClientURL loads the client URL from the config file if it |
| 602 | // wasn't provided via --url or CODER_URL. |