mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/moby/buildkit 6bd81372ad6f (v0.13.0-dev)
full diff: 6bd81372ad...d6e142600e
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
6
vendor/github.com/moby/buildkit/frontend/gateway/client/attestation.go
generated
vendored
6
vendor/github.com/moby/buildkit/frontend/gateway/client/attestation.go
generated
vendored
@ -30,8 +30,14 @@ func AttestationToPB[T any](a *result.Attestation[T]) (*pb.Attestation, error) {
|
||||
}
|
||||
|
||||
func AttestationFromPB[T any](a *pb.Attestation) (*result.Attestation[T], error) {
|
||||
if a == nil {
|
||||
return nil, errors.Errorf("invalid nil attestation")
|
||||
}
|
||||
subjects := make([]result.InTotoSubject, len(a.InTotoSubjects))
|
||||
for i, subject := range a.InTotoSubjects {
|
||||
if subject == nil {
|
||||
return nil, errors.Errorf("invalid nil attestation subject")
|
||||
}
|
||||
subjects[i] = result.InTotoSubject{
|
||||
Kind: subject.Kind,
|
||||
Name: subject.Name,
|
||||
|
Reference in New Issue
Block a user