feat(cmd): add examples

This commit is contained in:
iyear 2022-09-10 15:20:16 +08:00
parent 52ca0caf01
commit 52d44d1f0e
3 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@ var CmdDL = &cobra.Command{
Use: "dl",
Aliases: []string{"download"},
Short: "Download what you want",
Example: "",
Example: "tdl dl -h",
}
func init() {

View file

@ -12,7 +12,7 @@ var (
var cmdURL = &cobra.Command{
Use: "url",
Short: "Download in url mode",
Example: "",
Example: "tdl dl url -n iyear --proxy socks5://127.0.0.1:1080 -u https://t.me/tdl/1 -u https://t.me/tdl/2 -s 262144 -t 16 -l 3",
RunE: func(cmd *cobra.Command, args []string) error {
proxy, err := cmd.Flags().GetString("proxy")
if err != nil {

View file

@ -9,7 +9,7 @@ import (
var Cmd = &cobra.Command{
Use: "login",
Short: "Login to Telegram",
Example: "tdl login",
Example: "tdl login -n my-tdl --proxy socks5://localhost:1080",
RunE: func(cmd *cobra.Command, args []string) error {
proxy, err := cmd.Flags().GetString("proxy")
if err != nil {