diff --git a/config/config.go b/config/config.go index 03f7e133..40ec9f0d 100644 --- a/config/config.go +++ b/config/config.go @@ -5,6 +5,7 @@ import ( "github.com/TwinProduction/gatus/core" "gopkg.in/yaml.v2" "io/ioutil" + "os" "time" ) @@ -21,7 +22,14 @@ func Get() *Config { if config == nil { cfg, err := readConfigurationFile("config.yaml") if err != nil { - panic(err) + if os.IsNotExist(err) { + cfg, err = readConfigurationFile("config.yml") + if err != nil { + panic(err) + } + } else { + panic(err) + } } config = cfg }