Skip to content

Commit

Permalink
remove unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
bonifaido committed May 27, 2019
1 parent 8cb7b1a commit 7326f9b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions internal/cli/command/controlplane/cmd.go
Expand Up @@ -28,8 +28,8 @@ func NewControlPlaneCommand(banzaiCli cli.Cli) *cobra.Command {
}

cmd.AddCommand(
NewUpCommand(banzaiCli),
NewDownCommand(banzaiCli),
NewUpCommand(),
NewDownCommand(),
)

return cmd
Expand Down
7 changes: 3 additions & 4 deletions internal/cli/command/controlplane/down.go
Expand Up @@ -20,14 +20,13 @@ import (
"io/ioutil"
"os"

"github.com/banzaicloud/banzai-cli/internal/cli"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"gopkg.in/AlecAivazis/survey.v1"
)

// NewDownCommand creates a new cobra.Command for `banzai clontrolplane down`.
func NewDownCommand(banzaiCli cli.Cli) *cobra.Command {
func NewDownCommand() *cobra.Command {
options := createOptions{}

cmd := &cobra.Command{
Expand All @@ -36,7 +35,7 @@ func NewDownCommand(banzaiCli cli.Cli) *cobra.Command {
Long: "Destroy a controlplane based on json stdin or interactive session",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
runDestroy(banzaiCli, options)
runDestroy(options)
},
}

Expand All @@ -47,7 +46,7 @@ func NewDownCommand(banzaiCli cli.Cli) *cobra.Command {
return cmd
}

func runDestroy(banzaiCli cli.Cli, options createOptions) {
func runDestroy(options createOptions) {
var out map[string]interface{}

filename := options.file
Expand Down
7 changes: 3 additions & 4 deletions internal/cli/command/controlplane/up.go
Expand Up @@ -23,7 +23,6 @@ import (
"path/filepath"
"strings"

"github.com/banzaicloud/banzai-cli/internal/cli"
"github.com/mattn/go-isatty"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand All @@ -36,7 +35,7 @@ type createOptions struct {
}

// NewUpCommand creates a new cobra.Command for `banzai clontrolplane up`.
func NewUpCommand(banzaiCli cli.Cli) *cobra.Command {
func NewUpCommand() *cobra.Command {
options := createOptions{}

cmd := &cobra.Command{
Expand All @@ -46,7 +45,7 @@ func NewUpCommand(banzaiCli cli.Cli) *cobra.Command {
Long: "Create controlplane based on json stdin or interactive session",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
runUp(banzaiCli, options)
runUp(options)
},
}

Expand All @@ -57,7 +56,7 @@ func NewUpCommand(banzaiCli cli.Cli) *cobra.Command {
return cmd
}

func runUp(banzaiCli cli.Cli, options createOptions) {
func runUp(options createOptions) {
var out map[string]interface{}

filename := options.file
Expand Down

0 comments on commit 7326f9b

Please sign in to comment.