@@ -21,16 +21,17 @@ import (
21
21
"context"
22
22
"encoding/json"
23
23
"fmt"
24
+ "maps"
24
25
"os"
25
26
"path/filepath"
27
+ "slices"
26
28
"sort"
27
29
28
30
"github.com/compose-spec/compose-go/v2/dotenv"
29
31
"github.com/compose-spec/compose-go/v2/errdefs"
30
32
"github.com/compose-spec/compose-go/v2/utils"
31
33
"github.com/distribution/reference"
32
34
godigest "github.com/opencontainers/go-digest"
33
- "golang.org/x/exp/maps"
34
35
"golang.org/x/sync/errgroup"
35
36
"gopkg.in/yaml.v3"
36
37
)
@@ -120,21 +121,21 @@ func (p *Project) ServicesWithBuild() []string {
120
121
servicesBuild := p .Services .Filter (func (s ServiceConfig ) bool {
121
122
return s .Build != nil && s .Build .Context != ""
122
123
})
123
- return maps .Keys (servicesBuild )
124
+ return slices . AppendSeq ( make ([] string , 0 ), maps .Keys (servicesBuild ) )
124
125
}
125
126
126
127
func (p * Project ) ServicesWithExtends () []string {
127
128
servicesExtends := p .Services .Filter (func (s ServiceConfig ) bool {
128
129
return s .Extends != nil && * s .Extends != (ExtendsConfig {})
129
130
})
130
- return maps .Keys (servicesExtends )
131
+ return slices . AppendSeq ( make ([] string , 0 ), maps .Keys (servicesExtends ) )
131
132
}
132
133
133
134
func (p * Project ) ServicesWithDependsOn () []string {
134
135
servicesDependsOn := p .Services .Filter (func (s ServiceConfig ) bool {
135
136
return len (s .DependsOn ) > 0
136
137
})
137
- return maps .Keys (servicesDependsOn )
138
+ return slices . AppendSeq ( make ([] string , 0 ), maps .Keys (servicesDependsOn ) )
138
139
}
139
140
140
141
func (p * Project ) ServicesWithCapabilities () ([]string , []string , []string ) {
0 commit comments