Revert "feat: Support multiple configuration files" (#395)
Revert "feat: Support multiple configuration files (#389)"
This reverts commit 8e14302765
.
This commit is contained in:
14
main.go
14
main.go
@ -52,14 +52,14 @@ func save() {
|
||||
}
|
||||
}
|
||||
|
||||
func loadConfiguration() (*config.Config, error) {
|
||||
var configPath = os.Getenv("GATUS_CONFIG_PATH")
|
||||
// Backwards compatibility
|
||||
if len(configPath) == 0 {
|
||||
configPath = os.Getenv("GATUS_CONFIG_FILE")
|
||||
func loadConfiguration() (cfg *config.Config, err error) {
|
||||
customConfigFile := os.Getenv("GATUS_CONFIG_FILE")
|
||||
if len(customConfigFile) > 0 {
|
||||
cfg, err = config.Load(customConfigFile)
|
||||
} else {
|
||||
cfg, err = config.LoadDefaultConfiguration()
|
||||
}
|
||||
|
||||
return config.LoadConfiguration(configPath)
|
||||
return
|
||||
}
|
||||
|
||||
// initializeStorage initializes the storage provider
|
||||
|
Reference in New Issue
Block a user