We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1ad17c commit 60fcbadCopy full SHA for 60fcbad
internal/config/advanced_cluster_v2_schema.go
@@ -8,7 +8,9 @@ import (
8
const AdvancedClusterV2SchemaEnvVar = "MONGODB_ATLAS_ADVANCED_CLUSTER_V2_SCHEMA"
9
const allowAdvancedClusterV2Schema = false // Don't allow in master branch yet, not in const block to allow automatic change
10
11
+// Environment variable is read only once to avoid possible changes during runtime
12
+var advancedClusterV2Schema, _ = strconv.ParseBool(os.Getenv(AdvancedClusterV2SchemaEnvVar))
13
+
14
func AdvancedClusterV2Schema() bool {
- env, _ := strconv.ParseBool(os.Getenv(AdvancedClusterV2SchemaEnvVar))
- return allowAdvancedClusterV2Schema && env
15
+ return allowAdvancedClusterV2Schema && advancedClusterV2Schema
16
}
0 commit comments