Add stub for bootstrap

This commit is contained in:
Ian Howell
2019-05-29 12:04:38 -05:00
parent 19461dc1bf
commit ca616ca3ee
2 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
package bootstrap
import (
"fmt"
"io"
"github.com/spf13/cobra"
"github.com/ian-howell/airshipctl/pkg/environment"
)
// PluginSettingsID is used as a key in the root settings map of plugin settings
const PluginSettingsID = "bootstrap"
// NewBootstrapCommand creates a new command for bootstrapping airshipctl
func NewBootstrapCommand(out io.Writer, rootSettings *environment.AirshipCTLSettings) *cobra.Command {
bootstrapRootCmd := &cobra.Command{
Use: "bootstrap",
Short: "bootstraps airshipctl",
Run: func(cmd *cobra.Command, args []string) {
fmt.Fprintf(out, "Under construction\n")
},
}
return bootstrapRootCmd
}

View File

@@ -5,8 +5,9 @@ import (
"github.com/spf13/cobra"
"github.com/ian-howell/airshipctl/pkg/environment"
"github.com/ian-howell/airshipctl/cmd/workflow"
"github.com/ian-howell/airshipctl/cmd/bootstrap"
"github.com/ian-howell/airshipctl/pkg/environment"
)
// NewRootCmd creates the root `airshipctl` command. All other commands are
@@ -29,5 +30,6 @@ func NewRootCmd(out io.Writer) (*cobra.Command, *environment.AirshipCTLSettings,
// default commands to airshipctl
func AddDefaultAirshipCTLCommands(cmd *cobra.Command, settings *environment.AirshipCTLSettings) *cobra.Command {
cmd.AddCommand(workflow.NewWorkflowCommand(cmd.OutOrStdout(), settings))
cmd.AddCommand(bootstrap.NewBootstrapCommand(cmd.OutOrStdout(), settings))
return cmd
}