mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
vendor: github.com/moby/buildkit v0.21.0-rc1
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
6
vendor/github.com/moby/buildkit/solver/pb/platform.go
generated
vendored
6
vendor/github.com/moby/buildkit/solver/pb/platform.go
generated
vendored
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user