From e5809e49cb9b679243d6f121c049bb11c1d41bca Mon Sep 17 00:00:00 2001 From: Donny Xia Date: Fri, 11 Sep 2020 14:59:09 -0700 Subject: [PATCH] remove not used args --- cmd/config/internal/commands/run-fns.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/config/internal/commands/run-fns.go b/cmd/config/internal/commands/run-fns.go index dc987e8cdf..4414cc1ef0 100644 --- a/cmd/config/internal/commands/run-fns.go +++ b/cmd/config/internal/commands/run-fns.go @@ -104,7 +104,7 @@ func (r *RunFnRunner) runE(c *cobra.Command, args []string) error { // getContainerFunctions parses the commandline flags and arguments into explicit // Functions to run. -func (r *RunFnRunner) getContainerFunctions(c *cobra.Command, args, dataItems []string) ( +func (r *RunFnRunner) getContainerFunctions(c *cobra.Command, dataItems []string) ( []*yaml.RNode, error) { if r.Image == "" && r.StarPath == "" && r.ExecPath == "" && r.StarURL == "" { @@ -198,7 +198,7 @@ data: {} } err = rc.PipeE( yaml.LookupCreate(yaml.MappingNode, "metadata", "annotations"), - yaml.SetField("config.kubernetes.io/function", yaml.NewScalarRNode(value))) + yaml.SetField(runtimeutil.FunctionAnnotationKey, yaml.NewScalarRNode(value))) if err != nil { return nil, err } @@ -272,7 +272,7 @@ func (r *RunFnRunner) preRunE(c *cobra.Command, args []string) error { return errors.Errorf("0 or 1 arguments supported, function arguments go after '--'") } - fns, err := r.getContainerFunctions(c, args, dataItems) + fns, err := r.getContainerFunctions(c, dataItems) if err != nil { return err }