vendor: github.com/moby/buildkit v0.21.0-rc1

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg
2025-04-09 10:28:03 -05:00
parent a34cdff84e
commit 8fb1157b5f
221 changed files with 6530 additions and 3986 deletions

View File

@ -1,6 +1,8 @@
package pb
import (
"slices"
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
)
@ -12,7 +14,7 @@ func (p *Platform) Spec() ocispecs.Platform {
OSVersion: p.OSVersion,
}
if p.OSFeatures != nil {
result.OSFeatures = append([]string{}, p.OSFeatures...)
result.OSFeatures = slices.Clone(p.OSFeatures)
}
return result
}
@ -25,7 +27,7 @@ func PlatformFromSpec(p ocispecs.Platform) *Platform {
OSVersion: p.OSVersion,
}
if p.OSFeatures != nil {
result.OSFeatures = append([]string{}, p.OSFeatures...)
result.OSFeatures = slices.Clone(p.OSFeatures)
}
return result
}