small fixes

Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
aiordache 2021-01-19 15:26:08 +01:00
parent f291b77902
commit 68b29f569b
2 changed files with 1 additions and 8 deletions

View File

@ -20,7 +20,6 @@ package context
import (
"context"
"fmt"
"github.com/pkg/errors"
"github.com/spf13/cobra"
@ -74,13 +73,8 @@ func runCreateKube(ctx context.Context, contextName string, opts kube.ContextPar
}
func createContextData(ctx context.Context, opts kube.ContextParams) (interface{}, string, error) {
description := ""
if opts.Description != "" {
description = fmt.Sprintf("%s (%s)", opts.Description, description)
}
return store.KubeContext{
Endpoint: opts.Endpoint,
FromEnvironment: opts.FromEnvironment,
}, description, nil
}, opts.Description, nil
}

View File

@ -44,7 +44,6 @@ func init() {
}
func service(ctx context.Context) (backend.Service, error) {
contextStore := store.ContextStore(ctx)
currentContext := apicontext.CurrentContext(ctx)
var kubeContext store.KubeContext