The Chart node of chart dir `dir`, 0 when it is none. */
| 3612 | |
| 3613 | /* The Chart node of chart dir `dir`, 0 when it is none. */ |
| 3614 | static int64_t k8s_chart_node(k8s_dep_link_t *l, const char *dir) { |
| 3615 | static const char *const names[] = {"Chart.yaml", "Chart.yml"}; |
| 3616 | for (size_t i = 0; i < sizeof(names) / sizeof(names[0]); i++) { |
| 3617 | char path[CBM_SZ_1K]; |
| 3618 | snprintf(path, sizeof(path), "%s%s%s", dir, dir[0] ? "/" : "", names[i]); |
| 3619 | int64_t id = k8s_first_id(l->charts, path); |
| 3620 | if (id > 0) { |
| 3621 | return id; |
| 3622 | } |
| 3623 | } |
| 3624 | return 0; |
| 3625 | } |
| 3626 | |
| 3627 | /* The external Chart of `name` in repository `url` (NULL: unknown), the one |
| 3628 | * chart dependencies use. */ |
no test coverage detected