style(offsite): 清单描述符直接转换成 ImageBlob,消除 staticcheck S1016
This commit is contained in:
1 file changed
+1
-1
@@ -188,7 +188,7 @@ func describeManifest(body []byte, mediaType string) (ImageManifest, error) {
|
|||||||
return ImageManifest{}, err
|
return ImageManifest{}, err
|
||||||
}
|
}
|
||||||
if !slices.ContainsFunc(im.Blobs, func(b ImageBlob) bool { return b.Digest == d.Digest }) {
|
if !slices.ContainsFunc(im.Blobs, func(b ImageBlob) bool { return b.Digest == d.Digest }) {
|
||||||
im.Blobs = append(im.Blobs, ImageBlob{Digest: d.Digest, Size: d.Size})
|
im.Blobs = append(im.Blobs, ImageBlob(d))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in new issue
Block a user