bump compose-go to v2.1.1

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-05-30 15:37:13 +02:00
parent e3e16ad088
commit 33a5528003
11 changed files with 187 additions and 118 deletions

View File

@ -198,12 +198,15 @@ func portIndexer(y any, p tree.Path) (string, error) {
return "", nil
}
func envFileIndexer(y any, _ tree.Path) (string, error) {
func envFileIndexer(y any, p tree.Path) (string, error) {
switch value := y.(type) {
case string:
return value, nil
case map[string]any:
return value["path"].(string), nil
if pathValue, ok := value["path"]; ok {
return pathValue.(string), nil
}
return "", fmt.Errorf("environment path attribut %s is missing", p)
}
return "", nil
}