mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update compose-go to v2.0.0-rc.8
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
16
vendor/github.com/compose-spec/compose-go/v2/override/uncity.go
generated
vendored
16
vendor/github.com/compose-spec/compose-go/v2/override/uncity.go
generated
vendored
@ -107,13 +107,17 @@ func enforceUnicity(value any, p tree.Path) (any, error) {
|
||||
return value, nil
|
||||
}
|
||||
|
||||
func keyValueIndexer(y any, _ tree.Path) (string, error) {
|
||||
value := y.(string)
|
||||
key, _, found := strings.Cut(value, "=")
|
||||
if !found {
|
||||
return value, nil
|
||||
func keyValueIndexer(y any, p tree.Path) (string, error) {
|
||||
switch value := y.(type) {
|
||||
case string:
|
||||
key, _, found := strings.Cut(value, "=")
|
||||
if !found {
|
||||
return value, nil
|
||||
}
|
||||
return key, nil
|
||||
default:
|
||||
return "", fmt.Errorf("%s: unexpected type %T", p, y)
|
||||
}
|
||||
return key, nil
|
||||
}
|
||||
|
||||
func volumeIndexer(y any, p tree.Path) (string, error) {
|
||||
|
Reference in New Issue
Block a user