bumpo compose-go to v2.1.0

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
Guillaume Lours
2024-04-23 10:28:28 +02:00
parent 699fa43f7f
commit e3e16ad088
29 changed files with 146 additions and 66 deletions

View File

@ -24,13 +24,16 @@ import (
"github.com/compose-spec/compose-go/v2/tree"
)
func transformVolumeMount(data any, p tree.Path) (any, error) {
func transformVolumeMount(data any, p tree.Path, ignoreParseError bool) (any, error) {
switch v := data.(type) {
case map[string]any:
return v, nil
case string:
volume, err := format.ParseVolume(v) // TODO(ndeloof) ParseVolume should not rely on types and return map[string]
if err != nil {
if ignoreParseError {
return v, nil
}
return nil, err
}
volume.Target = cleanTarget(volume.Target)