From 0a9e2a788523438e59613f7c5526772f3a59e9d9 Mon Sep 17 00:00:00 2001 From: Shubham Minglani Date: Wed, 12 Jul 2017 14:45:52 +0530 Subject: [PATCH] remove unused parameter from ValidateComposeFile() In pkg/app/app.go, the function ValidateComposeFile() has an unused parameter "cmd *cobra.Command". This commit removes that parameter from the function and the callers of the function. --- cmd/convert.go | 2 +- cmd/down.go | 2 +- cmd/up.go | 2 +- pkg/app/app.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/convert.go b/cmd/convert.go index 53b77057..db4fc53a 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -88,7 +88,7 @@ var convertCmd = &cobra.Command{ // Validate before doing anything else. Use "bundle" if passed in. app.ValidateFlags(GlobalBundle, args, cmd, &ConvertOpt) - app.ValidateComposeFile(cmd, &ConvertOpt) + app.ValidateComposeFile(&ConvertOpt) }, Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/down.go b/cmd/down.go index c7364b29..81c651ae 100644 --- a/cmd/down.go +++ b/cmd/down.go @@ -45,7 +45,7 @@ var downCmd = &cobra.Command{ } // Validate before doing anything else. - app.ValidateComposeFile(cmd, &DownOpt) + app.ValidateComposeFile(&DownOpt) }, Run: func(cmd *cobra.Command, args []string) { app.Down(DownOpt) diff --git a/cmd/up.go b/cmd/up.go index 7452f640..b7b23e99 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -60,7 +60,7 @@ var upCmd = &cobra.Command{ } // Validate before doing anything else. - app.ValidateComposeFile(cmd, &UpOpt) + app.ValidateComposeFile(&UpOpt) }, Run: func(cmd *cobra.Command, args []string) { app.Up(UpOpt) diff --git a/pkg/app/app.go b/pkg/app/app.go index b1f2ec13..50ff922a 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -136,7 +136,7 @@ func ValidateFlags(bundle string, args []string, cmd *cobra.Command, opt *kobjec } // ValidateComposeFile validated the compose file provided for conversion -func ValidateComposeFile(cmd *cobra.Command, opt *kobject.ConvertOptions) { +func ValidateComposeFile(opt *kobject.ConvertOptions) { if len(opt.InputFiles) == 0 { // Here docker-compose is the input opt.InputFiles = []string{"docker-compose.yml"}