Skip to content

Commit

Permalink
refactor: Turn int64 to int
Browse files Browse the repository at this point in the history
I'm unusre if typing maxConcurrency int64 will work well on 32bit.
  • Loading branch information
caffeine-addictt committed Apr 9, 2024
1 parent c8969a4 commit 7233be5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (e *strategyEnum) Type() string {
var getFlags struct {
inputFile string
strategy strategyEnum
maxConcurrency int64
maxConcurrency int
}

var getCommand = &cobra.Command{
Expand Down Expand Up @@ -232,7 +232,7 @@ func init() {

rootCommand.AddCommand(getCommand)
getCommand.Flags().StringVarP(&getFlags.inputFile, "file", "f", "", "Path to the input file containing the url(s)")
getCommand.Flags().Int64VarP(&getFlags.maxConcurrency, "max-concurrency", "m", 10, "Maximum number of concurrent downloads [0 = unlimited] (default is 10)")
getCommand.Flags().IntVarP(&getFlags.maxConcurrency, "max-concurrency", "m", 10, "Maximum number of concurrent downloads [0 = unlimited] (default is 10)")
getCommand.Flags().VarP(&getFlags.strategy, "strategy", "s", "Strategy to use when downloading (default is concurrent)")
if err := getCommand.RegisterFlagCompletionFunc("strategy", strategyCompletion); err != nil {
fmt.Println("Failed to register completion for flag -s in get command")
Expand Down

0 comments on commit 7233be5

Please sign in to comment.