Skip to content

Commit

Permalink
Simplify snapshot distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdiaa committed Sep 21, 2023
1 parent e515a3c commit e66c88a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ func GetRobotsTxtVersions(url string, limit int, recent bool) ([]string, error)
selectedVersions = append(selectedVersions, version...)
}
} else {
interval := (length + limit - 1) / limit
interval := length / (limit - 1)

for i := 0; i < limit; i++ {
index := length - 1 - (i * interval)
index := i * interval
if index >= length {
index = length - (limit - i)
}
Expand Down

0 comments on commit e66c88a

Please sign in to comment.