mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/compose-spec/compose-go/v2 v2.1.2
Replaces uses of the github.com/mitchellh/mapstructure module, which was deprecated by the owner and moved to new maintainership at github.com/go-viper/mapstructure. The old module is still referenced as indirect dependency (through docker/cli and theupdateframework/notary), but not used in code, and should eventually go away. full diff: https://github.com/compose-spec/compose-go/compare/v2.1.1...v2.1.2 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
14
vendor/github.com/compose-spec/compose-go/v2/cli/options.go
generated
vendored
14
vendor/github.com/compose-spec/compose-go/v2/cli/options.go
generated
vendored
@ -215,14 +215,16 @@ func WithLoadOptions(loadOptions ...func(*loader.Options)) ProjectOptionsFn {
|
||||
|
||||
// WithDefaultProfiles uses the provided profiles (if any), and falls back to
|
||||
// profiles specified via the COMPOSE_PROFILES environment variable otherwise.
|
||||
func WithDefaultProfiles(profile ...string) ProjectOptionsFn {
|
||||
if len(profile) == 0 {
|
||||
for _, s := range strings.Split(os.Getenv(consts.ComposeProfiles), ",") {
|
||||
profile = append(profile, strings.TrimSpace(s))
|
||||
func WithDefaultProfiles(profiles ...string) ProjectOptionsFn {
|
||||
return func(o *ProjectOptions) error {
|
||||
if len(profiles) == 0 {
|
||||
for _, s := range strings.Split(o.Environment[consts.ComposeProfiles], ",") {
|
||||
profiles = append(profiles, strings.TrimSpace(s))
|
||||
}
|
||||
}
|
||||
|
||||
o.loadOptions = append(o.loadOptions, loader.WithProfiles(profiles))
|
||||
return nil
|
||||
}
|
||||
return WithProfiles(profile)
|
||||
}
|
||||
|
||||
// WithProfiles sets profiles to be activated
|
||||
|
2
vendor/github.com/compose-spec/compose-go/v2/loader/loader.go
generated
vendored
2
vendor/github.com/compose-spec/compose-go/v2/loader/loader.go
generated
vendored
@ -39,7 +39,7 @@ import (
|
||||
"github.com/compose-spec/compose-go/v2/tree"
|
||||
"github.com/compose-spec/compose-go/v2/types"
|
||||
"github.com/compose-spec/compose-go/v2/validation"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/exp/slices"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
2
vendor/github.com/compose-spec/compose-go/v2/override/uncity.go
generated
vendored
2
vendor/github.com/compose-spec/compose-go/v2/override/uncity.go
generated
vendored
@ -206,7 +206,7 @@ func envFileIndexer(y any, p tree.Path) (string, error) {
|
||||
if pathValue, ok := value["path"]; ok {
|
||||
return pathValue.(string), nil
|
||||
}
|
||||
return "", fmt.Errorf("environment path attribut %s is missing", p)
|
||||
return "", fmt.Errorf("environment path attribute %s is missing", p)
|
||||
}
|
||||
return "", nil
|
||||
}
|
||||
|
2
vendor/github.com/compose-spec/compose-go/v2/transform/ports.go
generated
vendored
2
vendor/github.com/compose-spec/compose-go/v2/transform/ports.go
generated
vendored
@ -21,7 +21,7 @@ import (
|
||||
|
||||
"github.com/compose-spec/compose-go/v2/tree"
|
||||
"github.com/compose-spec/compose-go/v2/types"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
)
|
||||
|
||||
func transformPorts(data any, p tree.Path, ignoreParseError bool) (any, error) {
|
||||
|
2
vendor/github.com/compose-spec/compose-go/v2/types/config.go
generated
vendored
2
vendor/github.com/compose-spec/compose-go/v2/types/config.go
generated
vendored
@ -21,7 +21,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user