Introduce a global context. As is common in Go, the idea is to propagate this cancellable context wherever it may be needed.
In an effort to keep this PR reviewable, I kept the changes contained to the app storage API. In fact, only the saucectl storage subcommands make use of this global context.
However, any other commands will also benefit immediately, as issuing a SIGINT twice will always result in a hard exit at the top level, irrespective of whether the global context is used or not.
Description
Introduce a global context. As is common in Go, the idea is to propagate this cancellable context wherever it may be needed. In an effort to keep this PR reviewable, I kept the changes contained to the app storage API. In fact, only the
saucectl storage
subcommands make use of this global context.However, any other commands will also benefit immediately, as issuing a SIGINT twice will always result in a hard exit at the top level, irrespective of whether the global context is used or not.