Regenerate Go

This commit is contained in:
Bryce Lampe
2024-03-26 17:06:19 -07:00
parent cbf957533e
commit 91c652a702
10 changed files with 88 additions and 90 deletions

View File

@@ -17,6 +17,9 @@ package internal
import (
"strings"
"github.com/docker/buildx/controller/pb"
controllerapi "github.com/docker/buildx/controller/pb"
"github.com/docker/buildx/util/buildflags"
"github.com/pulumi/pulumi-go-provider/infer"
)
@@ -61,3 +64,16 @@ func (s SSH) String() string {
return r
}
func (s SSH) validate() (*controllerapi.SSH, error) {
parsed, err := buildflags.ParseSSHSpecs([]string{s.String()})
if err != nil {
return nil, err
}
if len(parsed) == 0 {
return nil, nil
}
_, err = controllerapi.CreateSSH([]*pb.SSH{{ID: s.ID, Paths: s.Paths}})
return parsed[0], err
}