vendor: update to compose-go 1.13.4

Signed-off-by: Nick Sieger <nick@nicksieger.com>
This commit is contained in:
Nick Sieger
2023-04-21 10:52:58 -05:00
parent afcaa8df5f
commit 956a1be656
34 changed files with 1130 additions and 770 deletions

View File

@ -22,6 +22,7 @@ import (
interp "github.com/compose-spec/compose-go/interpolation"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
var interpolateTypeCastMapping = map[interp.Path]interp.Cast{
@ -114,9 +115,15 @@ func toFloat32(value string) (interface{}, error) {
// should match http://yaml.org/type/bool.html
func toBoolean(value string) (interface{}, error) {
switch strings.ToLower(value) {
case "y", "yes", "true", "on":
case "true":
return true, nil
case "n", "no", "false", "off":
case "false":
return false, nil
case "y", "yes", "on":
logrus.Warnf("%q for boolean is not supported by YAML 1.2, please use `true`", value)
return true, nil
case "n", "no", "off":
logrus.Warnf("%q for boolean is not supported by YAML 1.2, please use `false`", value)
return false, nil
default:
return nil, errors.Errorf("invalid boolean: %s", value)