Skip to content

Commit

Permalink
Update options.go
Browse files Browse the repository at this point in the history
made the minimal opt.Limit < 2
  • Loading branch information
allmightyspiff authored Feb 16, 2024
1 parent b12cd8a commit 2a4460e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sl/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (opt *Options) GetRemainingAPICalls() int {

// Makes sure the limit is set to something, not 0 or 1. Will set to default if no other limit is set.
func (opt *Options) ValidateLimit() int {
if opt.Limit == nil || *opt.Limit < DefaultLimit {
if opt.Limit == nil || *opt.Limit < 2 {
opt.Limit = &DefaultLimit
}
return *opt.Limit
Expand Down

0 comments on commit 2a4460e

Please sign in to comment.