File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -121,21 +121,21 @@ func (p *Project) ServicesWithBuild() []string {
121
121
servicesBuild := p .Services .Filter (func (s ServiceConfig ) bool {
122
122
return s .Build != nil && s .Build .Context != ""
123
123
})
124
- return slices .AppendSeq ( make ([] string , 0 ), maps .Keys (servicesBuild ))
124
+ return slices .Collect ( maps .Keys (servicesBuild ))
125
125
}
126
126
127
127
func (p * Project ) ServicesWithExtends () []string {
128
128
servicesExtends := p .Services .Filter (func (s ServiceConfig ) bool {
129
129
return s .Extends != nil && * s .Extends != (ExtendsConfig {})
130
130
})
131
- return slices .AppendSeq ( make ([] string , 0 ), maps .Keys (servicesExtends ))
131
+ return slices .Collect ( maps .Keys (servicesExtends ))
132
132
}
133
133
134
134
func (p * Project ) ServicesWithDependsOn () []string {
135
135
servicesDependsOn := p .Services .Filter (func (s ServiceConfig ) bool {
136
136
return len (s .DependsOn ) > 0
137
137
})
138
- return slices .AppendSeq ( make ([] string , 0 ), maps .Keys (servicesDependsOn ))
138
+ return slices .Collect ( maps .Keys (servicesDependsOn ))
139
139
}
140
140
141
141
func (p * Project ) ServicesWithCapabilities () ([]string , []string , []string ) {
Original file line number Diff line number Diff line change @@ -283,13 +283,13 @@ func TestWithServices(t *testing.T) {
283
283
284
284
func TestServicesWithBuild (t * testing.T ) {
285
285
p := makeProject ()
286
- assert .DeepEqual (t , [] string {}, p .ServicesWithBuild ())
286
+ assert .Equal (t , len ( p .ServicesWithBuild ()), 0 )
287
287
288
288
service , err := p .GetService ("service_1" )
289
289
assert .NilError (t , err )
290
290
service .Build = & BuildConfig {}
291
291
p .Services ["service_1" ] = service
292
- assert .DeepEqual (t , [] string {}, p .ServicesWithBuild ())
292
+ assert .Equal (t , len ( p .ServicesWithBuild ()), 0 )
293
293
294
294
service .Build = & BuildConfig {
295
295
Context : "." ,
You can’t perform that action at this time.
0 commit comments