mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-12-11 16:05:00 +00:00
API: Improved the rate limit parser
This commit is contained in:
parent
f3b4362ada
commit
ce752a0230
|
@ -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
|
// we need to remove IDs from these
|
||||||
for ; skip < len(parts); skip++ {
|
for ; skip < len(parts); skip += 2 {
|
||||||
// Check if it's a number:
|
// Check if it's a number:
|
||||||
if _, err := strconv.Atoi(parts[skip]); err == nil {
|
if _, err := strconv.Atoi(parts[skip]); err == nil {
|
||||||
parts[skip] = ""
|
parts[skip] = ""
|
||||||
|
|
Loading…
Reference in a new issue