Use image constructor in client
Replace manual image struct creation with the image constructor which is there to do just that. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -173,10 +173,7 @@ func (c *container) Image(ctx context.Context) (Image, error) {
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to get image %s for container", r.Image)
|
||||
}
|
||||
return &image{
|
||||
client: c.client,
|
||||
i: i,
|
||||
}, nil
|
||||
return NewImage(c.client, i), nil
|
||||
}
|
||||
|
||||
func (c *container) NewTask(ctx context.Context, ioCreate cio.Creator, opts ...NewTaskOpts) (_ Task, err error) {
|
||||
|
||||
Reference in New Issue
Block a user