MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/cpp-samples / GetEnv

Function GetEnv

getting-started/gcs_indexing.cc:169–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169std::string GetEnv(char const* var) {
170 auto const* value = std::getenv(var);
171 if (value == nullptr) {
172 throw std::runtime_error("Environment variable " + std::string(var) +
173 " is not set");
174 }
175 return value;
176}
177
178} // namespace google::cloud::cpp_samples

Callers 2

GetPublisherFunction · 0.70
GetSpannerClientFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected