Show only a log message when could not read conf
This commit is contained in:
+4
-2
@@ -27,14 +27,16 @@ func Start(filename string) {
|
|||||||
file, err := os.Open(filename)
|
file, err := os.Open(filename)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Error(err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
// Reading config
|
// Reading config
|
||||||
if err := json.NewDecoder(file).Decode(&conf); err != nil {
|
if err := json.NewDecoder(file).Decode(&conf); err != nil {
|
||||||
log.Fatal(err)
|
log.Error(err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Using a in memory database
|
// Using a in memory database
|
||||||
|
|||||||
Reference in New Issue
Block a user