Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize location of AddCommand(...) call #228

Merged
merged 1 commit into from
May 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clusterctl/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ var createCmd = &cobra.Command{
}

func init() {
createCmd.AddCommand(createClusterCmd)
RootCmd.AddCommand(createCmd)
}
1 change: 1 addition & 0 deletions clusterctl/cmd/create_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func init() {
// Optional flags
createClusterCmd.Flags().BoolVarP(&co.CleanupExternalCluster, "cleanup-external-cluster", "", true, "Whether to cleanup the external cluster after bootstrap")
createClusterCmd.Flags().StringVarP(&co.VmDriver, "vm-driver", "", "", "Which vm driver to use for minikube")
createCmd.AddCommand(createClusterCmd)
}

func parseClusterYaml(file string) (*clusterv1.Cluster, error) {
Expand Down
1 change: 0 additions & 1 deletion clusterctl/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ var deleteCmd = &cobra.Command{
}

func init() {
deleteCmd.AddCommand(NewCmdDeleteCluster())
RootCmd.AddCommand(deleteCmd)
}
4 changes: 4 additions & 0 deletions clusterctl/cmd/delete_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ func NewCmdDeleteCluster() *cobra.Command {
return cmd
}

func init() {
deleteCmd.AddCommand(NewCmdDeleteCluster())
}

func RunDelete() error {
return errors.NotImplementedError
}
1 change: 0 additions & 1 deletion clusterctl/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ func init() {
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)

logs.InitLogs()
RootCmd.AddCommand(createCmd)
}