From 35e24067fca5a8c4d7036b89d3a7628c36fabfb0 Mon Sep 17 00:00:00 2001 From: Phillip Wittrock Date: Wed, 15 Jan 2020 16:49:15 -0800 Subject: [PATCH] drop short-hand flags from `config run` command --- cmd/config/internal/commands/run-fns.go | 8 ++++---- cmd/config/internal/commands/run_test.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/config/internal/commands/run-fns.go b/cmd/config/internal/commands/run-fns.go index 290ea7d91d..55b5ed6bf0 100644 --- a/cmd/config/internal/commands/run-fns.go +++ b/cmd/config/internal/commands/run-fns.go @@ -34,11 +34,11 @@ func GetRunFnRunner(name string) *RunFnRunner { &r.DryRun, "dry-run", false, "print results to stdout") r.Command.Flags().BoolVar( &r.GlobalScope, "global-scope", false, "set global scope for functions.") - r.Command.Flags().StringSliceVarP( - &r.FnPaths, "fn-path", "p", []string{}, + r.Command.Flags().StringSliceVar( + &r.FnPaths, "fn-path", []string{}, "read functions from these directories instead of the configuration directory.") - r.Command.Flags().StringVarP( - &r.Image, "image", "i", "", + r.Command.Flags().StringVar( + &r.Image, "image", "", "run this image as a function instead of discovering them.") return r } diff --git a/cmd/config/internal/commands/run_test.go b/cmd/config/internal/commands/run_test.go index 56f2d916b8..e9ae8b9bcf 100644 --- a/cmd/config/internal/commands/run_test.go +++ b/cmd/config/internal/commands/run_test.go @@ -90,7 +90,7 @@ apiVersion: v1 }, { name: "custom kind", - args: []string{"run", "dir", "-i", "foo:bar", "--", "Foo", "g=h"}, + args: []string{"run", "dir", "--image", "foo:bar", "--", "Foo", "g=h"}, path: "dir", expected: ` metadata: @@ -105,7 +105,7 @@ apiVersion: v1 }, { name: "custom kind '=' in data", - args: []string{"run", "dir", "-i", "foo:bar", "--", "Foo", "g=h", "i=j=k"}, + args: []string{"run", "dir", "--image", "foo:bar", "--", "Foo", "g=h", "i=j=k"}, path: "dir", expected: ` metadata: @@ -120,14 +120,14 @@ apiVersion: v1 }, { name: "function paths", - args: []string{"run", "dir", "-p", "path1", "--fn-path", "path2"}, + args: []string{"run", "dir", "--fn-path", "path1", "--fn-path", "path2"}, path: "dir", functionPaths: []string{"path1", "path2"}, }, { name: "custom kind with function paths", args: []string{ - "run", "dir", "-p", "path", "-i", "foo:bar", "--", "Foo", "g=h", "i=j=k"}, + "run", "dir", "--fn-path", "path", "--image", "foo:bar", "--", "Foo", "g=h", "i=j=k"}, path: "dir", functionPaths: []string{"path"}, expected: `