(c container.Summary)
| 345 | } |
| 346 | |
| 347 | func getContainerNameWithoutProject(c container.Summary) string { |
| 348 | project := c.Labels[api.ProjectLabel] |
| 349 | defaultName := getDefaultContainerName(project, c.Labels[api.ServiceLabel], c.Labels[api.ContainerNumberLabel]) |
| 350 | name := getCanonicalContainerName(c) |
| 351 | if name != defaultName { |
| 352 | // service declares a custom container_name |
| 353 | return name |
| 354 | } |
| 355 | return name[len(project)+1:] |
| 356 | } |
| 357 | |
| 358 | // projectFromName builds a types.Project based on actual resources with compose labels set |
| 359 | func (s *composeService) projectFromName(containers Containers, projectName string, services ...string) (*types.Project, error) { |
no test coverage detected