replace passing parameters by context with singletons

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2021-03-11 11:43:40 +01:00
parent 9301c298ef
commit 48402585fd
No known key found for this signature in database
GPG key ID: 9858809D6F8F6E7E
47 changed files with 169 additions and 205 deletions

View file

@ -39,9 +39,9 @@ const ComDockerCli = "com.docker.cli"
// ExecIfDefaultCtxType delegates to com.docker.cli if on moby context
func ExecIfDefaultCtxType(ctx context.Context, root *cobra.Command) {
currentContext := apicontext.CurrentContext(ctx)
currentContext := apicontext.Current()
s := store.ContextStore(ctx)
s := store.Instance()
currentCtx, err := s.Get(currentContext)
// Only run original docker command if the current context is not ours.