(c container.Summary)
| 330 | } |
| 331 | |
| 332 | func getCanonicalContainerName(c container.Summary) string { |
| 333 | if len(c.Names) == 0 { |
| 334 | // corner case, sometime happens on removal. return short ID as a safeguard value |
| 335 | return c.ID[:12] |
| 336 | } |
| 337 | // Names return container canonical name /foo + link aliases /linked_by/foo |
| 338 | for _, name := range c.Names { |
| 339 | if strings.LastIndex(name, "/") == 0 { |
| 340 | return name[1:] |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | return strings.TrimPrefix(c.Names[0], "/") |
| 345 | } |
| 346 | |
| 347 | func getContainerNameWithoutProject(c container.Summary) string { |
| 348 | project := c.Labels[api.ProjectLabel] |
no outgoing calls
no test coverage detected