Skip to content

Commit

Permalink
changefilenames
Browse files Browse the repository at this point in the history
  • Loading branch information
Cortey committed Dec 20, 2024
1 parent 44494a5 commit 8de914e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ import (
"github.com/spf13/cobra"
)

type removeConfig struct {
type deleteConfig struct {
*cmdcommon.KymaConfig

module string
}

func newRemoveCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command {
cfg := removeConfig{
func newDeleteCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command {
cfg := deleteConfig{
KymaConfig: kymaConfig,
}

cmd := &cobra.Command{
Use: "remove <module>",
Short: "Remove module",
Long: "Use this command to remove module",
Use: "delete <module>",
Short: "Delete module",
Long: "Use this command to delete module",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
cfg.module = args[0]
clierror.Check(runRemove(&cfg))
clierror.Check(runDelete(&cfg))
},
}

return cmd
}

func runRemove(cfg *removeConfig) clierror.Error {
func runDelete(cfg *deleteConfig) clierror.Error {
client, clierr := cfg.GetKubeClientWithClierr()
if clierr != nil {
return clierr
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/alpha/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func NewModuleCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command {

cmd.AddCommand(newListCMD(kymaConfig))
cmd.AddCommand(newAddCMD(kymaConfig))
cmd.AddCommand(newRemoveCMD(kymaConfig))
cmd.AddCommand(newDeleteCMD(kymaConfig))

return cmd
}

0 comments on commit 8de914e

Please sign in to comment.