Skip to content

Commit

Permalink
Merge pull request #5376 from twz123/remove-deprecated-subcommands
Browse files Browse the repository at this point in the history
Remove default-config and validate sub-commands
  • Loading branch information
twz123 authored Dec 26, 2024
2 parents 0e0d033 + fdbcccb commit 0cd5e1e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 54 deletions.
11 changes: 0 additions & 11 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
"github.com/k0sproject/k0s/cmd/stop"
"github.com/k0sproject/k0s/cmd/sysinfo"
"github.com/k0sproject/k0s/cmd/token"
"github.com/k0sproject/k0s/cmd/validate"
"github.com/k0sproject/k0s/cmd/version"
"github.com/k0sproject/k0s/cmd/worker"
k0slog "github.com/k0sproject/k0s/internal/pkg/log"
Expand Down Expand Up @@ -104,12 +103,10 @@ func NewRootCmd() *cobra.Command {
cmd.AddCommand(stop.NewStopCmd())
cmd.AddCommand(sysinfo.NewSysinfoCmd())
cmd.AddCommand(token.NewTokenCmd())
cmd.AddCommand(validate.NewValidateCmd()) // hidden+deprecated
cmd.AddCommand(version.NewVersionCmd())
cmd.AddCommand(worker.NewWorkerCmd())

cmd.AddCommand(newCompletionCmd())
cmd.AddCommand(newDefaultConfigCmd()) // hidden+deprecated
cmd.AddCommand(newDocsCmd())

cmd.DisableAutoGenTag = true
Expand Down Expand Up @@ -139,14 +136,6 @@ func newDocsCmd() *cobra.Command {
}
}

func newDefaultConfigCmd() *cobra.Command {
cmd := configcmd.NewCreateCmd()
cmd.Hidden = true
cmd.Deprecated = "use 'k0s config create' instead"
cmd.Use = "default-config"
return cmd
}

func newCompletionCmd() *cobra.Command {
return &cobra.Command{
Use: "completion {bash|zsh|fish|powershell}",
Expand Down
43 changes: 0 additions & 43 deletions cmd/validate/validate.go

This file was deleted.

0 comments on commit 0cd5e1e

Please sign in to comment.