Skip to content

Instantly share code, notes, and snippets.

@ducmeit1
Created July 18, 2019 17:13
Show Gist options
  • Save ducmeit1/0dae45658cf1bd0b0b1d807c892d3c42 to your computer and use it in GitHub Desktop.
Save ducmeit1/0dae45658cf1bd0b0b1d807c892d3c42 to your computer and use it in GitHub Desktop.
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var downloadSongCmd = &cobra.Command{
Use: "song",
Short: "Download MP3 song from Zing MP3",
Long: "Download MP3 song from Zing MP3",
RunE: func(cmd *cobra.Command, args []string) error {
//TODO: Implement Download Song from Zing MP3
},
}
var downloadVideoCmd = &cobra.Command{
Use: "video",
Short: "Download MP4 video from Zing MP3",
Long: "Download MP4 video from Zing MP3",
RunE: func(cmd *cobra.Command, args []string) error {
//TODO: Implement Download Video from ZING MP3
},
}
init() {
rootCmd.AddCommand(downloadSongCmd)
rootCmd.AddCommand(downloadVideoCmd)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment