diff --git a/main.go b/main.go index 47e6437..af25f29 100644 --- a/main.go +++ b/main.go @@ -23,12 +23,14 @@ func main() { err := models.SetConfig() if err != nil { fmt.Println(err) + os.Exit(1) } // Set Engine err = models.SetEngine() if err != nil { fmt.Println(err) + os.Exit(1) } // Start the webserver diff --git a/models/config.go b/models/config.go index dba67f3..935f70c 100644 --- a/models/config.go +++ b/models/config.go @@ -27,7 +27,7 @@ type ConfigStruct struct { var Config = new(ConfigStruct) // SetConfig initianlises the config and publishes it for other functions to use -func SetConfig() error { +func SetConfig() (err error) { // File Checks if _, err := os.Stat("config.ini"); os.IsNotExist(err) {