Refine README and delete commented lines

This commit is contained in:
zzxwill
2020-07-17 13:40:50 +08:00
parent bdb8af9492
commit c9cd323612
2 changed files with 1 additions and 10 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ metadata:
generation: 2
name: poc
namespace: default
xxx
...
spec:
components:
- componentName: poc
-9
View File
@@ -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)
}