mirror of
https://github.com/containers/skopeo.git
synced 2025-08-31 22:28:33 +00:00
Pre-allocate an array
golangci-lint linter: prealloc Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@@ -668,7 +668,7 @@ func (h *proxyHandler) GetLayerInfo(args []any) (replyBuf, error) {
|
||||
layerInfos = img.LayerInfos()
|
||||
}
|
||||
|
||||
var layers []convertedLayerInfo
|
||||
layers := make([]convertedLayerInfo, 0, len(layerInfos))
|
||||
for _, layer := range layerInfos {
|
||||
layers = append(layers, convertedLayerInfo{layer.Digest, layer.Size, layer.MediaType})
|
||||
}
|
||||
|
Reference in New Issue
Block a user