From c9cd323612131bc2659c25c845aedb6787f127e9 Mon Sep 17 00:00:00 2001 From: zzxwill Date: Fri, 17 Jul 2020 13:40:32 +0800 Subject: [PATCH] Refine README and delete commented lines --- README.md | 2 +- pkg/cmd/bind.go | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index b7f92df51..84ce1f64a 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ metadata: generation: 2 name: poc namespace: default - xxx + ... spec: components: - componentName: poc diff --git a/pkg/cmd/bind.go b/pkg/cmd/bind.go index c16c6bd64..098fca354 100644 --- a/pkg/cmd/bind.go +++ b/pkg/cmd/bind.go @@ -44,7 +44,6 @@ func NewCmdBind(f cmdutil.Factory, c client.Client, ioStreams cmdutil.IOStreams) cmdutil.CheckErr(o.Run(f, cmd, ctx)) }, } - //var traitList []Trait var traitDefinitions corev1alpha2.TraitDefinitionList err := c.List(ctx, &traitDefinitions) @@ -56,11 +55,6 @@ func NewCmdBind(f cmdutil.Factory, c client.Client, ioStreams cmdutil.IOStreams) for _, t := range traitDefinitions.Items { template := t.ObjectMeta.Annotations["defatultTemplateRef"] - //traitList = append(traitList, Trait{ - // Name: t.Name, - // Short: t.ObjectMeta.Annotations["short"], - //}) - var traitTemplate v1alpha2.Template err := c.Get(ctx, client.ObjectKey{Namespace: "default", Name: template}, &traitTemplate) if err != nil { @@ -81,8 +75,6 @@ func NewCmdBind(f cmdutil.Factory, c client.Client, ioStreams cmdutil.IOStreams) cmd.PersistentFlags().String(p.Name, p.Default, p.Usage) } } - - // traitTemplate.DeepCopyInto(&o.Template) } return cmd @@ -197,7 +189,6 @@ func (o *commandOptions) Run(f cmdutil.Factory, cmd *cobra.Command, ctx context. c := o.Client err := c.Update(ctx, &o.AppConfig) if err != nil { - // msg := fmt.Sprintf("Applying trait %s to component %s failed: %s", traitName, componentName, err) msg := fmt.Sprintf("Applying trait hit an issue: %s", err) cmdutil.PrintErrorMessage(msg, 1) }