ServiceNames returns service names in dependency order.
(svcs ...string)
| 167 | |
| 168 | // ServiceNames returns service names in dependency order. |
| 169 | func (c *Composer) ServiceNames(svcs ...string) ([]string, error) { |
| 170 | var names []string |
| 171 | if err := c.project.ForEachService(svcs, func(name string, svc *compose.ServiceConfig) error { |
| 172 | names = append(names, svc.Name) |
| 173 | return nil |
| 174 | }); err != nil { |
| 175 | return nil, err |
| 176 | } |
| 177 | return names, nil |
| 178 | } |