cmd: don't alias context package, and use cliContext for cli.Context
Unfortunately, this is a rather large diff, but perhaps worth a one-time "rip off the bandaid" for v2. This patch removes the use of "gocontext" as alias for stdLib's "context", and uses "cliContext" for uses of cli.context. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
gocontext "context"
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
@@ -28,11 +28,11 @@ import (
|
||||
)
|
||||
|
||||
type killer interface {
|
||||
Kill(gocontext.Context, syscall.Signal, ...containerd.KillOpts) error
|
||||
Kill(context.Context, syscall.Signal, ...containerd.KillOpts) error
|
||||
}
|
||||
|
||||
// ForwardAllSignals forwards signals
|
||||
func ForwardAllSignals(ctx gocontext.Context, task killer) chan os.Signal {
|
||||
func ForwardAllSignals(ctx context.Context, task killer) chan os.Signal {
|
||||
sigc := make(chan os.Signal, 128)
|
||||
signal.Notify(sigc)
|
||||
go func() {
|
||||
|
Reference in New Issue
Block a user