Change bootstrap's io.Writer to match other commands
This commit is contained in:
parent
cb0d15bdb8
commit
d7a0f93cd1
@ -2,7 +2,6 @@ package bootstrap
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
@ -13,11 +12,12 @@ import (
|
|||||||
const PluginSettingsID = "bootstrap"
|
const PluginSettingsID = "bootstrap"
|
||||||
|
|
||||||
// NewBootstrapCommand creates a new command for bootstrapping airshipctl
|
// NewBootstrapCommand creates a new command for bootstrapping airshipctl
|
||||||
func NewBootstrapCommand(out io.Writer, rootSettings *environment.AirshipCTLSettings) *cobra.Command {
|
func NewBootstrapCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {
|
||||||
bootstrapRootCmd := &cobra.Command{
|
bootstrapRootCmd := &cobra.Command{
|
||||||
Use: "bootstrap",
|
Use: "bootstrap",
|
||||||
Short: "bootstraps airshipctl",
|
Short: "bootstraps airshipctl",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
out := cmd.OutOrStdout()
|
||||||
fmt.Fprintf(out, "Under construction\n")
|
fmt.Fprintf(out, "Under construction\n")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,6 @@ func NewRootCmd(out io.Writer) (*cobra.Command, *environment.AirshipCTLSettings,
|
|||||||
// default commands to airshipctl
|
// default commands to airshipctl
|
||||||
func AddDefaultAirshipCTLCommands(cmd *cobra.Command, settings *environment.AirshipCTLSettings) *cobra.Command {
|
func AddDefaultAirshipCTLCommands(cmd *cobra.Command, settings *environment.AirshipCTLSettings) *cobra.Command {
|
||||||
cmd.AddCommand(workflow.NewWorkflowCommand(settings))
|
cmd.AddCommand(workflow.NewWorkflowCommand(settings))
|
||||||
cmd.AddCommand(bootstrap.NewBootstrapCommand(cmd.OutOrStdout(), settings))
|
cmd.AddCommand(bootstrap.NewBootstrapCommand(settings))
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user