Add clear downloads and clear torrents command
This commit is contained in:
@@ -37,7 +37,23 @@ func main() {
|
||||
},
|
||||
}
|
||||
|
||||
rootCmd.AddCommand(versionCmd, networkTestCmd)
|
||||
var clearDownloadsCmd = &cobra.Command{
|
||||
Use: "clear-downloads",
|
||||
Short: "Clear all downloads (unrestricted links) in your account",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
internal.ClearDownloads()
|
||||
},
|
||||
}
|
||||
|
||||
var clearTorrentsCmd = &cobra.Command{
|
||||
Use: "clear-torrents",
|
||||
Short: "Clear all torrents in your account",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
internal.ClearTorrents()
|
||||
},
|
||||
}
|
||||
|
||||
rootCmd.AddCommand(versionCmd, networkTestCmd, clearDownloadsCmd, clearTorrentsCmd)
|
||||
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
Reference in New Issue
Block a user