From fa738519c4b7765e7169a03e0ca51576e7cbfa0e Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Wed, 4 Sep 2024 15:35:21 -0400 Subject: [PATCH 1/2] fixing issue 174 closes #174 Signed-off-by: Robert Sirchia --- cmd/mapkubeapis/map.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmd/mapkubeapis/map.go b/cmd/mapkubeapis/map.go index 14209ec..fcd5d65 100644 --- a/cmd/mapkubeapis/map.go +++ b/cmd/mapkubeapis/map.go @@ -65,10 +65,6 @@ func newMapCmd(_ io.Writer, args []string) *cobra.Command { flags := cmd.PersistentFlags() flags.ParseErrorsWhitelist.UnknownFlags = true - err := flags.Parse(args) - if err != nil { - return nil - } settings = new(EnvSettings) From dad8d496c409b8a1988352153ea7643e5af52b5a Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Wed, 4 Sep 2024 15:43:47 -0400 Subject: [PATCH 2/2] fixing linting errors Signed-off-by: Robert Sirchia --- cmd/mapkubeapis/map.go | 2 +- cmd/mapkubeapis/map_kube_apis.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/mapkubeapis/map.go b/cmd/mapkubeapis/map.go index fcd5d65..8a5ab18 100644 --- a/cmd/mapkubeapis/map.go +++ b/cmd/mapkubeapis/map.go @@ -41,7 +41,7 @@ var ( settings *EnvSettings ) -func newMapCmd(_ io.Writer, args []string) *cobra.Command { +func newMapCmd(_ io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "mapkubeapis [flags] RELEASE", Short: "Map release deprecated or removed Kubernetes APIs in-place", diff --git a/cmd/mapkubeapis/map_kube_apis.go b/cmd/mapkubeapis/map_kube_apis.go index a888bea..da2eaf7 100644 --- a/cmd/mapkubeapis/map_kube_apis.go +++ b/cmd/mapkubeapis/map_kube_apis.go @@ -21,7 +21,7 @@ import ( ) func main() { - mapCmd := newMapCmd(os.Stdout, os.Args[1:]) + mapCmd := newMapCmd(os.Stdout) if err := mapCmd.Execute(); err != nil { os.Exit(1)