1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-30 18:53:30 +00:00

API: Improved the rate limit parser

This commit is contained in:
diamondburned 2020-02-07 08:37:01 -08:00
parent f3b4362ada
commit ce752a0230

View file

@ -27,8 +27,12 @@ func ParseBucketKey(path string) string {
}
}
// We add 1, since this is the string path. The path following this would be
// the actual value, which we check.
skip++
// we need to remove IDs from these
for ; skip < len(parts); skip++ {
for ; skip < len(parts); skip += 2 {
// Check if it's a number:
if _, err := strconv.Atoi(parts[skip]); err == nil {
parts[skip] = ""