Browse Source

small fixes

Signed-off-by: aiordache <[email protected]>
aiordache 4 năm trước cách đây
mục cha
commit
68b29f569b
2 tập tin đã thay đổi với 1 bổ sung8 xóa
  1. 1 7
      cli/cmd/context/create_kube.go
  2. 0 1
      kube/backend.go

+ 1 - 7
cli/cmd/context/create_kube.go

@@ -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
 }

+ 0 - 1
kube/backend.go

@@ -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