MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / GetEnvVar

Function GetEnvVar

oneflow/api/cpp/env_impl.cpp:52–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52std::string GetEnvVar(const std::string& key, const std::string& default_value) {
53 const char* value = getenv(key.c_str());
54 if (value == nullptr) { return default_value; }
55 return std::string(value);
56}
57
58int64_t GetEnvVar(const std::string& key, int64_t default_value) {
59 const char* value = getenv(key.c_str());

Callers 1

CompleteEnvProtoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected