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:
5
task.go
5
task.go
@@ -458,10 +458,7 @@ func (t *task) Checkpoint(ctx context.Context, opts ...CheckpointTaskOpts) (Imag
|
||||
if im, err = t.client.ImageService().Create(ctx, im); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &image{
|
||||
client: t.client,
|
||||
i: im,
|
||||
}, nil
|
||||
return NewImage(t.client, im), nil
|
||||
}
|
||||
|
||||
// UpdateTaskInfo allows updated specific settings to be changed on a task
|
||||
|
Reference in New Issue
Block a user