feat(cmd): add comments

This commit is contained in:
iyear 2022-09-05 20:02:36 +08:00
parent 30dd6e048f
commit b54228cd0d
2 changed files with 7 additions and 7 deletions

View file

@ -48,12 +48,12 @@ var Cmd = &cobra.Command{
} }
func init() { func init() {
Cmd.Flags().IntVarP(&partSize, "part-size", "s", 512*1024, "") Cmd.Flags().IntVarP(&partSize, "part-size", "s", 512*1024, "part size for download, max is 512*1024")
Cmd.Flags().IntVarP(&threads, "threads", "t", 10, "") Cmd.Flags().IntVarP(&threads, "threads", "t", 8, "threads for downloading one item")
Cmd.Flags().IntVarP(&limit, "limit", "l", 2, "") Cmd.Flags().IntVarP(&limit, "limit", "l", 2, "max number of concurrent tasks")
// url mode // 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")
} }

View file

@ -27,8 +27,8 @@ var cmd = &cobra.Command{
func init() { func init() {
cmd.AddCommand(version.Cmd, login.Cmd, dl.Cmd) cmd.AddCommand(version.Cmd, login.Cmd, dl.Cmd)
cmd.PersistentFlags().String("proxy", "", "") cmd.PersistentFlags().String("proxy", "", "proxy address, only socks5 is supported")
cmd.PersistentFlags().StringP("ns", "n", "", "namespace") cmd.PersistentFlags().StringP("ns", "n", "", "namespace for Telegram session")
docs := filepath.Join(consts.DocsPath, "command") docs := filepath.Join(consts.DocsPath, "command")
if utils.FS.PathExists(docs) { if utils.FS.PathExists(docs) {