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:
Derek McGowan
2018-07-31 15:23:08 -07:00
parent 3629344e6e
commit d64d8a06d5
4 changed files with 5 additions and 20 deletions

View File

@@ -80,10 +80,7 @@ func (c *Client) Import(ctx context.Context, importer images.Importer, reader io
imgrec = updated
}
images = append(images, &image{
client: c,
i: imgrec,
})
images = append(images, NewImage(c, imgrec))
}
return images, nil
}