Skip to content

Commit

Permalink
Improve ForEachService description
Browse files Browse the repository at this point in the history
Co-authored-by: Milas Bowman <[email protected]>
  • Loading branch information
glours and milas authored Jan 10, 2024
1 parent 06666e2 commit eb908b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions types/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ func (p *Project) AllServices() Services {

type ServiceFunc func(name string, service *ServiceConfig) error

// ForEachService runs ServiceFunc on each service and dependencies according to DependencyPolicy
// The fn ServiceFunc should not mutate its ServiceConfig attribute
// ForEachService runs ServiceFunc on each service and dependencies according to DependencyPolicy.
//
// No copies are created; any mutation of `*ServiceConfig` by the fn `ServiceFunc` will apply to this `*Project` object.
func (p *Project) ForEachService(names []string, fn ServiceFunc, options ...DependencyOption) error {
if len(options) == 0 {
// backward compatibility
Expand Down

0 comments on commit eb908b2

Please sign in to comment.