mirror of https://github.com/docker/compose.git
small fixes
Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
parent
f291b77902
commit
68b29f569b
|
@ -20,7 +20,6 @@ package context
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"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) {
|
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{
|
return store.KubeContext{
|
||||||
Endpoint: opts.Endpoint,
|
Endpoint: opts.Endpoint,
|
||||||
FromEnvironment: opts.FromEnvironment,
|
FromEnvironment: opts.FromEnvironment,
|
||||||
}, description, nil
|
}, opts.Description, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func service(ctx context.Context) (backend.Service, error) {
|
func service(ctx context.Context) (backend.Service, error) {
|
||||||
|
|
||||||
contextStore := store.ContextStore(ctx)
|
contextStore := store.ContextStore(ctx)
|
||||||
currentContext := apicontext.CurrentContext(ctx)
|
currentContext := apicontext.CurrentContext(ctx)
|
||||||
var kubeContext store.KubeContext
|
var kubeContext store.KubeContext
|
||||||
|
|
Loading…
Reference in New Issue