mirror of https://github.com/docker/docs.git
examples.md: Actually use `ctx` variable in Go example
"List and manage containers" Go example: `ctx := context.Background()` was defined but never used. Follow the structure of the other examples instead.
This commit is contained in:
parent
d409cd73bb
commit
e529754f96
|
|
@ -245,7 +245,7 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{})
|
||||
containers, err := cli.ContainerList(ctx, types.ContainerListOptions{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue