From 6f38ea561b0c9bc55813328ad478259e33b8eca4 Mon Sep 17 00:00:00 2001 From: Andre Almar Date: Mon, 29 Jun 2020 16:01:24 -0300 Subject: [PATCH] Fixing ImageList Go code Original: on line 18 we have `images, err := cli.ImageList(context.Background(), types.ImageListOptions{})` which gives us an error of: ``` # command-line-arguments ./main.go:12:2: ctx declared but not used ``` *Fix:* on line 18 we need to have `images, err := cli.ImageList(ctx, types.ImageListOptions{})` --- engine/api/sdk/examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/api/sdk/examples.md b/engine/api/sdk/examples.md index e21177854f..e8e66ba55a 100644 --- a/engine/api/sdk/examples.md +++ b/engine/api/sdk/examples.md @@ -471,7 +471,7 @@ func main() { panic(err) } - images, err := cli.ImageList(context.Background(), types.ImageListOptions{}) + images, err := cli.ImageList(ctx, types.ImageListOptions{}) if err != nil { panic(err) }