diff --git a/codegpenv.go b/codegpenv.go index 06ea3ca..ddfda7a 100644 --- a/codegpenv.go +++ b/codegpenv.go @@ -5,6 +5,7 @@ import "os" var ( isLocal bool gcloudProjectID string + dataStoreHost string ) // Lang is a type to represent a language supported by codegp @@ -32,6 +33,7 @@ const ( func init() { isLocal = os.Getenv("IS_LOCAL") == "true" gcloudProjectID = os.Getenv("GCLOUD_PROJECT_ID") + dataStoreHost = os.Getenv("DATASTORE_EMULATOR_HOST") } // IsLocal returns true if running locally @@ -43,3 +45,8 @@ func IsLocal() bool { func GCloudProjectID() string { return gcloudProjectID } + +// DataStoreHost returns the datastore host +func DataStoreHost() string { + return dataStoreHost +}