| 89 | } |
| 90 | |
| 91 | std::string GetString(absl::string_view yaml, const YAML::Node& node) { |
| 92 | if (!node.IsDefined() || !node.IsScalar()) { |
| 93 | return ""; |
| 94 | } |
| 95 | try { |
| 96 | return node.as<std::string>(); |
| 97 | } catch (YAML::Exception& e) { |
| 98 | // This should never happen since we already checked that the node is a |
| 99 | // scalar and all scalars can be converted to strings. |
| 100 | return ""; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | bool IsBinary(const YAML::Node& node) { |
| 105 | return node.Tag() == "!!binary" || node.Tag() == "tag:yaml.org,2002:binary"; |
no outgoing calls
no test coverage detected