Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MultifileMaxConnPerHost int MultifileMaxConcurrentFiles int )
multifile mode config vars
View Source
var MultiFileCMD = &cobra.Command{ Use: "multifile [flags] <manifest-file>", Short: "download files from a manifest file in parallel", Long: multiFileLongDesc, Args: cobra.ExactArgs(1), PreRunE: func(cmd *cobra.Command, args []string) error { if viper.GetInt(optname.MaxConnPerHost) == 0 { viper.Set(optname.MaxConnPerHost, 40) } if viper.GetBool(optname.Extract) { return fmt.Errorf("cannot use --extract with multifile mode") } return nil }, Run: func(cmd *cobra.Command, args []string) { if err := execMultifile(cmd, args); err != nil { logging.Logger.Error().Err(err).Msg("Error") os.Exit(1) } }, }
View Source
var RootCMD = &cobra.Command{ Use: "pget [flags] <url> <dest>", Short: "pget", Long: rootLongDesc, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { return config.PersistentStartupProcessFlags() }, Run: func(cmd *cobra.Command, args []string) { if err := rootExecFunc(cmd, args); err != nil { log.Error().Err(err).Msg("Error") os.Exit(1) } }, Args: cobra.ExactArgs(2), }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.