Skip to content

Commit 2f32d03

Browse files
fix: pluralize list response variables (#9)
1 parent ff74940 commit 2f32d03

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ func main() {
5252
client := oxp.NewClient(
5353
option.WithBearerToken("My Bearer Token"), // defaults to os.LookupEnv("OXP_API_KEY")
5454
)
55-
tool, err := client.Tools.List(context.TODO(), oxp.ToolListParams{})
55+
tools, err := client.Tools.List(context.TODO(), oxp.ToolListParams{})
5656
if err != nil {
5757
panic(err.Error())
5858
}
59-
fmt.Printf("%+v\n", tool.Items)
59+
fmt.Printf("%+v\n", tools.Items)
6060
}
6161

6262
```
@@ -250,15 +250,15 @@ you need to examine response headers, status codes, or other details.
250250
```go
251251
// Create a variable to store the HTTP response
252252
var response *http.Response
253-
tool, err := client.Tools.List(
253+
tools, err := client.Tools.List(
254254
context.TODO(),
255255
oxp.ToolListParams{},
256256
option.WithResponseInto(&response),
257257
)
258258
if err != nil {
259259
// handle error
260260
}
261-
fmt.Printf("%+v\n", tool)
261+
fmt.Printf("%+v\n", tools)
262262

263263
fmt.Printf("Status Code: %d\n", response.StatusCode)
264264
fmt.Printf("Headers: %+#v\n", response.Header)

usage_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ func TestUsage(t *testing.T) {
2424
option.WithBaseURL(baseURL),
2525
option.WithBearerToken("My Bearer Token"),
2626
)
27-
tool, err := client.Tools.List(context.TODO(), oxp.ToolListParams{})
27+
tools, err := client.Tools.List(context.TODO(), oxp.ToolListParams{})
2828
if err != nil {
2929
t.Error(err)
3030
return
3131
}
32-
t.Logf("%+v\n", tool.Items)
32+
t.Logf("%+v\n", tools.Items)
3333
}

0 commit comments

Comments
 (0)