Documentation ¶
Index ¶
Constants ¶
View Source
const MaxWorkers = 1000
Variables ¶
View Source
var ( RootCmd = &cobra.Command{ Use: "timbu [flags] url", Short: "a fast HTTP downloader", Long: "a fast HTTP downloader that uses multiple connections to download files", Args: func(cmd *cobra.Command, args []string) error { switch { case len(args) < 1: return fmt.Errorf("no url was specified") case len(args) > 1: return fmt.Errorf("multiple downloads are not supported yet") } return nil }, PersistentPreRun: func(cmd *cobra.Command, args []string) { cmd.SilenceUsage = true }, RunE: func(cmd *cobra.Command, args []string) error { err := run(cmd, args) if errors.Is(err, cmd.Context().Err()) { return context.Cause(cmd.Context()) } return err }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.