Skip to content

Commit

Permalink
More tweaks and changes to code for listing and removing
Browse files Browse the repository at this point in the history
  • Loading branch information
simplyzee committed Sep 12, 2019
1 parent e8315ee commit bddf734
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 7 additions & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ var listCmd = &cobra.Command{
Use: "list",
Short: "List downloaded kubectl binaries",
Run: func(cmd *cobra.Command, args []string) {
_ = ListKubectlBinaries()
fmt.Println("Retrieving installed versions of kubectl")

err := ListKubectlBinaries()
if err != nil {
log.Fatal(err)
}
},
}

Expand All @@ -48,6 +53,7 @@ func init() {
// listCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

// ListKubectlBinaries - List available installed kubectl versions
func ListKubectlBinaries() error {

// Get user home directory path
Expand Down
8 changes: 1 addition & 7 deletions cmd/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ import (
// removeCmd represents the remove command
var removeCmd = &cobra.Command{
Use: "remove",
Short: "A brief description of your command",
Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Short: "Remove a kubectl version from machine",
Run: func(cmd *cobra.Command, args []string) {
err := RemoveKubectlVersion(args[0])
if err != nil {
Expand Down

0 comments on commit bddf734

Please sign in to comment.