This commit is contained in:
orangix
2026-01-19 02:36:52 +01:00
parent 8cb2524924
commit e5b87dc924
16 changed files with 66 additions and 67 deletions

View File

@@ -35,7 +35,7 @@ func GetJSON(url string) (gjson.Result, error) {
return gjson.Result{}, err
}
switch (res.StatusCode) {
switch res.StatusCode {
case 200:
return gjson.Parse(string(body)), nil
case 429:
@@ -43,4 +43,4 @@ func GetJSON(url string) (gjson.Result, error) {
default:
return gjson.Result{}, fmt.Errorf("received status %s, expected 200 OK.\n%s", res.Status, string(body))
}
}
}