Fix some context sharing/plumbing

With cobra switch (and maybe before), some context weren't *plumbed* the
right way, fixing that.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 075b75fa14e878afa87ad4fd989f03a8541b13eb
Component: engine
This commit is contained in:
Vincent Demeester
2016-06-09 17:58:10 +02:00
parent d7d14dd735
commit cde498e147
3 changed files with 8 additions and 3 deletions
@@ -35,8 +35,10 @@ func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
func runInspect(dockerCli *client.DockerCli, opts inspectOptions) error {
client := dockerCli.Client()
ctx := context.Background()
getVolFunc := func(name string) (interface{}, []byte, error) {
i, err := client.VolumeInspect(context.Background(), name)
i, err := client.VolumeInspect(ctx, name)
return i, nil, err
}