From e2727ecd8a925f03d8ee30022ef00b4216b24514 Mon Sep 17 00:00:00 2001 From: thejesh23 Date: Fri, 17 Jul 2026 01:27:32 -0700 Subject: [PATCH] fix: add target filter to Go getFiltered example Match the parameter shape of the curl/js/python/php/csharp examples on the same page, which all expose a target filter. Closes #62 --- setup.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.html b/setup.html index 39022d0b..7236af9d 100644 --- a/setup.html +++ b/setup.html @@ -1343,7 +1343,7 @@

Ask Your LLM

const baseURL = "${base}" // GetExercisesFiltered fetches exercises with optional filters -func GetExercisesFiltered(page, limit int, category, bodyPart, equipment string) (map[string]any, error) { +func GetExercisesFiltered(page, limit int, category, bodyPart, equipment, target string) (map[string]any, error) { params := url.Values{ "page": {strconv.Itoa(page)}, "limit": {strconv.Itoa(limit)}, @@ -1351,6 +1351,7 @@

Ask Your LLM

if category != "" { params.Set("category", category) } if bodyPart != "" { params.Set("body_part", bodyPart) } if equipment != "" { params.Set("equipment", equipment) } + if target != "" { params.Set("target", target) } resp, err := http.Get(baseURL + "/exercises?" + params.Encode()) if err != nil { @@ -1364,7 +1365,7 @@

Ask Your LLM

// Usage func main() { - result, err := GetExercisesFiltered(1, 20, "Strength", "Chest", "") + result, err := GetExercisesFiltered(1, 20, "Strength", "Chest", "", "") if err != nil { panic(err) } data := result["data"].([]any) fmt.Println(data[0].(map[string]any)["name"]) // e.g. Barbell Bench Press