| 260 | } |
| 261 | |
| 262 | std::string require_string(const FlattenedDocument & document, const std::string & key) { |
| 263 | const auto it = document.scalars.find(key); |
| 264 | if (it == document.scalars.end()) { |
| 265 | throw std::runtime_error("Missing yaml scalar key: " + key); |
| 266 | } |
| 267 | return it->second; |
| 268 | } |
| 269 | |
| 270 | std::string optional_string(const FlattenedDocument & document, const std::string & key, std::string default_value) { |
| 271 | const auto it = document.scalars.find(key); |
no test coverage detected