Created
July 18, 2019 16:58
-
-
Save ducmeit1/6ae360ba376f87c610bac343318452c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cmd | |
import ( | |
"fmt" | |
"github.com/spf13/cobra" | |
"os" | |
) | |
var rootCmd = &cobra.Command{ | |
Use: "zmp3", | |
Short: "A simple CLI for Golang use to download Song/Video from Zing Mp3", | |
Long: "A simple CLI for Golang use to download Song/Video from Zing Mp3", | |
RunE: func(cmd *cobra.Command, args []string) error { | |
return cmd.Help() | |
}, | |
} | |
func Execute() { | |
if err := rootCmd.Execute(); err != nil { | |
fmt.Println(err) | |
os.Exit(1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment