True if the file's basename is values.yaml / values.yml (Helm values, #338).
| 10109 | |
| 10110 | // True if the file's basename is values.yaml / values.yml (Helm values, #338). |
| 10111 | static bool is_helm_values_file(const char *rel) { |
| 10112 | if (!rel) { |
| 10113 | return false; |
| 10114 | } |
| 10115 | const char *b = strrchr(rel, '/'); |
| 10116 | b = b ? b + 1 : rel; |
| 10117 | return strcmp(b, "values.yaml") == 0 || strcmp(b, "values.yml") == 0; |
| 10118 | } |
| 10119 | |
| 10120 | // Descend stream -> document -> block_node to a YAML document's top-level |
| 10121 | // block_mapping. Returns a null node when the document has none. |