Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: jhrotko <joana.hrotko@docker.com>
  • Loading branch information
jhrotko committed Feb 7, 2024
1 parent cb28f5b commit 0ffff0f
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions types/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,26 +121,23 @@ func (p *Project) ConfigNames() []string {
}

func (p *Project) ServicesBuild() []string {
predicate := func(s ServiceConfig) bool {
servicesBuild := p.Services.Filter(func(s ServiceConfig) bool {
return s.Build != nil && s.Build.Context != ""
}
servicesBuild := p.Services.Filter(predicate)
})
return maps.Keys(servicesBuild)
}

func (p *Project) ServicesExtends() []string {
predicate := func(s ServiceConfig) bool {
servicesExtends := p.Services.Filter(func(s ServiceConfig) bool {
return s.Extends != nil && *s.Extends != (ExtendsConfig{})
}
servicesExtends := p.Services.Filter(predicate)
})
return maps.Keys(servicesExtends)
}

func (p *Project) ServicesDependsOn() []string {
predicate := func(s ServiceConfig) bool {
servicesDependsOn := p.Services.Filter(func(s ServiceConfig) bool {
return len(s.DependsOn) > 0
}
servicesDependsOn := p.Services.Filter(predicate)
})
return maps.Keys(servicesDependsOn)
}

Expand Down

0 comments on commit 0ffff0f

Please sign in to comment.