1
0
mirror of https://github.com/moby/buildkit.git synced 2025-07-27 16:41:49 +03:00

lint: nilness fixes

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2024-04-05 21:15:45 -07:00
parent dc23e43dc1
commit 8c4cdc8f43
4 changed files with 4 additions and 8 deletions

View File

@ -80,10 +80,9 @@ func (sr *immutableRef) tryComputeOverlayBlob(ctx context.Context, lower, upper
if err := compressed.Close(); err != nil {
return emptyDesc, false, errors.Wrap(err, "failed to close compressed diff writer")
}
if labels == nil {
labels = map[string]string{}
labels = map[string]string{
labelspkg.LabelUncompressed: dgstr.Digest().String(),
}
labels[labelspkg.LabelUncompressed] = dgstr.Digest().String()
} else {
if err = overlay.WriteUpperdir(ctx, bufW, upperdir, lower); err != nil {
return emptyDesc, false, errors.Wrap(err, "failed to write diff")