mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to master@8b7bcb900d3c
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
8
vendor/github.com/moby/buildkit/solver/result/attestation.go
generated
vendored
8
vendor/github.com/moby/buildkit/solver/result/attestation.go
generated
vendored
@ -1,8 +1,6 @@
|
||||
package result
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
pb "github.com/moby/buildkit/frontend/gateway/pb"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
)
|
||||
@ -58,9 +56,11 @@ func FromDigestMap(m map[string]string) []digest.Digest {
|
||||
return ds
|
||||
}
|
||||
|
||||
func ConvertAttestation[U any, V any](a *Attestation[U], fn func(U) (V, error)) (*Attestation[V], error) {
|
||||
func ConvertAttestation[U comparable, V comparable](a *Attestation[U], fn func(U) (V, error)) (*Attestation[V], error) {
|
||||
var zero U
|
||||
|
||||
var ref V
|
||||
if reflect.ValueOf(a.Ref).IsValid() {
|
||||
if a.Ref != zero {
|
||||
var err error
|
||||
ref, err = fn(a.Ref)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user