MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / GetBool

Function GetBool

env/env_yaml.cc:125–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125absl::StatusOr<bool> GetBool(absl::string_view yaml, absl::string_view key,
126 const YAML::Node& node) {
127 if (!node.IsDefined() || !node.IsScalar()) {
128 return false;
129 }
130 try {
131 return node.as<bool>();
132 } catch (YAML::Exception& e) {
133 return YamlError(yaml, node,
134 "Node '" + std::string(key) + "' is not a boolean");
135 }
136}
137
138absl::Status ParseName(Config& config, absl::string_view yaml,
139 const YAML::Node& root) {

Callers 7

ParseTypeInfoFunction · 0.85
GetMethod · 0.85
IsTrueMethod · 0.85
IsFalseMethod · 0.85
GetMethod · 0.85

Calls 1

YamlErrorFunction · 0.85

Tested by

no test coverage detected