Skip to content

Commit

Permalink
Fixing ImageList Go code
Browse files Browse the repository at this point in the history
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{})`
  • Loading branch information
andrealmar committed Jun 29, 2020
1 parent 9fdc494 commit 6f38ea5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/api/sdk/examples.md
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6f38ea5

Please sign in to comment.