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:
CrazyMax
2024-02-24 16:47:40 +01:00
parent 545a5c97c6
commit 95185e9525
36 changed files with 1185 additions and 496 deletions

View File

@ -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) {