diff --git a/cmd/check.go b/cmd/check.go index d7bd33afd..19e0519a8 100644 --- a/cmd/check.go +++ b/cmd/check.go @@ -18,7 +18,6 @@ import ( "context" "fmt" "io" - "os" "github.com/spf13/cobra" @@ -27,8 +26,8 @@ import ( var checker *ctl.CheckCommand -func newCheckCommand(_ io.Reader, _, _ io.Writer) *cobra.Command { - checker = ctl.NewCheckCommand(os.Stdin, os.Stdout, os.Stderr) +func newCheckCommand(stdin io.Reader, stdout io.Writer, stderr io.Writer) *cobra.Command { + checker = ctl.NewCheckCommand(stdin, stdout, stderr) checkCmd := &cobra.Command{ Use: "check [path2]...", Short: "Do a consistency check on a pilosa data file.", diff --git a/cmd/config.go b/cmd/config.go index a877d12ef..73464ba65 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -17,7 +17,6 @@ package cmd import ( "context" "io" - "os" "github.com/spf13/cobra" @@ -28,7 +27,7 @@ import ( var conf *ctl.ConfigCommand func newConfigCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command { - conf = ctl.NewConfigCommand(os.Stdin, os.Stdout, os.Stderr) + conf = ctl.NewConfigCommand(stdin, stdout, stderr) Server := server.NewCommand(stdin, stdout, stderr) confCmd := &cobra.Command{ Use: "config", diff --git a/cmd/export.go b/cmd/export.go index 217e9f09c..6cfeb0d9c 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -17,7 +17,6 @@ package cmd import ( "context" "io" - "os" "github.com/spf13/cobra" @@ -26,8 +25,8 @@ import ( var Exporter *ctl.ExportCommand -func newExportCommand(_ io.Reader, _, _ io.Writer) *cobra.Command { - Exporter = ctl.NewExportCommand(os.Stdin, os.Stdout, os.Stderr) +func newExportCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command { + Exporter = ctl.NewExportCommand(stdin, stdout, stderr) exportCmd := &cobra.Command{ Use: "export", Short: "Export data from pilosa.", diff --git a/cmd/generate_config.go b/cmd/generate_config.go index 6421a1f4f..8c8553aa4 100644 --- a/cmd/generate_config.go +++ b/cmd/generate_config.go @@ -17,7 +17,6 @@ package cmd import ( "context" "io" - "os" "github.com/spf13/cobra" @@ -26,8 +25,8 @@ import ( var generateConf *ctl.GenerateConfigCommand -func newGenerateConfigCommand(_ io.Reader, _, _ io.Writer) *cobra.Command { - generateConf = ctl.NewGenerateConfigCommand(os.Stdin, os.Stdout, os.Stderr) +func newGenerateConfigCommand(stdin io.Reader, stdout io.Writer, stderr io.Writer) *cobra.Command { + generateConf = ctl.NewGenerateConfigCommand(stdin, stdout, stderr) confCmd := &cobra.Command{ Use: "generate-config", Short: "Print the default configuration.", diff --git a/cmd/inspect.go b/cmd/inspect.go index 4f5ff9301..570e7aae3 100644 --- a/cmd/inspect.go +++ b/cmd/inspect.go @@ -18,7 +18,6 @@ import ( "context" "fmt" "io" - "os" "github.com/spf13/cobra" @@ -27,8 +26,8 @@ import ( var inspector *ctl.InspectCommand -func newInspectCommand(_ io.Reader, _, _ io.Writer) *cobra.Command { - inspector = ctl.NewInspectCommand(os.Stdin, os.Stdout, os.Stderr) +func newInspectCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command { + inspector = ctl.NewInspectCommand(stdin, stdout, stderr) inspectCmd := &cobra.Command{ Use: "inspect",