refactor(update): clean up actions/update

- move common arguments to a shared struct
- remove unused fields
- fix outdated names
- improve logging/error handling
This commit is contained in:
nils måsén 2024-01-05 22:57:37 +01:00
parent cb8e86d705
commit a6949dede9
4 changed files with 112 additions and 102 deletions

View file

@ -396,7 +396,10 @@ func (client dockerClient) PullImage(ctx context.Context, container t.Container)
return err
}
defer response.Close()
defer func() {
_ = response.Close()
}()
// the pull request will be aborted prematurely unless the response is read
if _, err = io.ReadAll(response); err != nil {
log.Error(err)