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

Function HasEnvVar

oneflow/api/cpp/env_impl.cpp:47–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45inline bool IsEnvInited() { return of::Singleton<of::EnvGlobalObjectsScope>::Get() != nullptr; }
46
47bool HasEnvVar(const std::string& key) {
48 const char* value = getenv(key.c_str());
49 return value != nullptr;
50}
51
52std::string GetEnvVar(const std::string& key, const std::string& default_value) {
53 const char* value = getenv(key.c_str());

Callers 1

CompleteEnvProtoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected