mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit v0.14-dev version 549891b
Brings in formatter for lint requests. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
14
vendor/github.com/moby/buildkit/frontend/dockerui/requests.go
generated
vendored
14
vendor/github.com/moby/buildkit/frontend/dockerui/requests.go
generated
vendored
@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/moby/buildkit/frontend/gateway/client"
|
||||
"github.com/moby/buildkit/frontend/subrequests"
|
||||
"github.com/moby/buildkit/frontend/subrequests/lint"
|
||||
"github.com/moby/buildkit/frontend/subrequests/outline"
|
||||
"github.com/moby/buildkit/frontend/subrequests/targets"
|
||||
"github.com/moby/buildkit/solver/errdefs"
|
||||
@ -19,6 +20,7 @@ const (
|
||||
type RequestHandler struct {
|
||||
Outline func(context.Context) (*outline.Outline, error)
|
||||
ListTargets func(context.Context) (*targets.List, error)
|
||||
Lint func(context.Context) (*lint.LintResults, error)
|
||||
AllowOther bool
|
||||
}
|
||||
|
||||
@ -55,6 +57,18 @@ func (bc *Client) HandleSubrequest(ctx context.Context, h RequestHandler) (*clie
|
||||
res, err := targets.ToResult()
|
||||
return res, true, err
|
||||
}
|
||||
case lint.SubrequestLintDefinition.Name:
|
||||
if f := h.Lint; f != nil {
|
||||
warnings, err := f(ctx)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
if warnings == nil {
|
||||
return nil, true, nil
|
||||
}
|
||||
res, err := warnings.ToResult()
|
||||
return res, true, err
|
||||
}
|
||||
}
|
||||
if h.AllowOther {
|
||||
return nil, false, nil
|
||||
|
Reference in New Issue
Block a user