mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-16 16:37:10 +08:00
bump compose-go to v2.4.9
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:

committed by
CrazyMax

parent
00fdcd38ab
commit
bf95aa3dfa
5
vendor/github.com/compose-spec/compose-go/v2/validation/validation.go
generated
vendored
5
vendor/github.com/compose-spec/compose-go/v2/validation/validation.go
generated
vendored
@ -65,7 +65,6 @@ func check(value any, p tree.Path) error {
|
||||
|
||||
func checkFileObject(keys ...string) checkerFunc {
|
||||
return func(value any, p tree.Path) error {
|
||||
|
||||
v := value.(map[string]any)
|
||||
count := 0
|
||||
for _, s := range keys {
|
||||
@ -100,8 +99,8 @@ func checkPath(value any, p tree.Path) error {
|
||||
func checkDeviceRequest(value any, p tree.Path) error {
|
||||
v := value.(map[string]any)
|
||||
_, hasCount := v["count"]
|
||||
_, hasIds := v["device_ids"]
|
||||
if hasCount && hasIds {
|
||||
_, hasIDs := v["device_ids"]
|
||||
if hasCount && hasIDs {
|
||||
return fmt.Errorf(`%s: "count" and "device_ids" attributes are exclusive`, p)
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user