mirror of
https://github.com/bit1001/tdl.git
synced 2024-09-20 06:35:54 +08:00
feat(cmd): add examples
This commit is contained in:
parent
52ca0caf01
commit
52d44d1f0e
|
@ -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() {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue