mirror of
https://github.com/bit1001/tdl.git
synced 2024-09-20 06:35:54 +08:00
feat(cmd): add comments
This commit is contained in:
parent
30dd6e048f
commit
b54228cd0d
10
cmd/dl/dl.go
10
cmd/dl/dl.go
|
@ -48,12 +48,12 @@ var Cmd = &cobra.Command{
|
|||
}
|
||||
|
||||
func init() {
|
||||
Cmd.Flags().IntVarP(&partSize, "part-size", "s", 512*1024, "")
|
||||
Cmd.Flags().IntVarP(&threads, "threads", "t", 10, "")
|
||||
Cmd.Flags().IntVarP(&limit, "limit", "l", 2, "")
|
||||
Cmd.Flags().IntVarP(&partSize, "part-size", "s", 512*1024, "part size for download, max is 512*1024")
|
||||
Cmd.Flags().IntVarP(&threads, "threads", "t", 8, "threads for downloading one item")
|
||||
Cmd.Flags().IntVarP(&limit, "limit", "l", 2, "max number of concurrent tasks")
|
||||
|
||||
// url mode
|
||||
Cmd.Flags().StringSliceVarP(&urls, "url", "u", make([]string, 0), "")
|
||||
Cmd.Flags().StringSliceVarP(&urls, "url", "u", make([]string, 0), "array of message links to be downloaded")
|
||||
|
||||
Cmd.Flags().StringVarP(&mode, "mode", "m", "url", "")
|
||||
Cmd.Flags().StringVarP(&mode, "mode", "m", "", "mode for download")
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@ var cmd = &cobra.Command{
|
|||
|
||||
func init() {
|
||||
cmd.AddCommand(version.Cmd, login.Cmd, dl.Cmd)
|
||||
cmd.PersistentFlags().String("proxy", "", "")
|
||||
cmd.PersistentFlags().StringP("ns", "n", "", "namespace")
|
||||
cmd.PersistentFlags().String("proxy", "", "proxy address, only socks5 is supported")
|
||||
cmd.PersistentFlags().StringP("ns", "n", "", "namespace for Telegram session")
|
||||
|
||||
docs := filepath.Join(consts.DocsPath, "command")
|
||||
if utils.FS.PathExists(docs) {
|
||||
|
|
Loading…
Reference in a new issue