Skip to content

Commit 148286f

Browse files
chore: remove deprecated environment variable CONFIG (#79)
BREAKING CHANGE: the environment variable `CONFIG` is removed, use `SQLEXPORTER_CONFIG` instead.
1 parent 378b2e8 commit 148286f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

cmd/sql_exporter/main.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,7 @@ func main() {
4646
alsoLogToStderr.DefValue = "true"
4747
_ = alsoLogToStderr.Value.Set("true")
4848
}
49-
// Override the config.file default with the CONFIG environment variable, if set. If the flag is explicitly set, it
50-
// will end up overriding either.
51-
// Deprecated: "CONFIG" variable will be replaced by "SQLEXPORTER_CONFIG" in the next release
52-
if envConfigFile := os.Getenv("CONFIG"); envConfigFile != "" {
53-
*configFile = envConfigFile
54-
}
55-
49+
// Override the config.file default with the SQLEXPORTER_CONFIG environment variable if set.
5650
if val, ok := os.LookupEnv(envConfigFile); ok {
5751
*configFile = val
5852
}

0 commit comments

Comments
 (0)