diff --git a/config.go b/config.go index a3d81ed..b53a010 100644 --- a/config.go +++ b/config.go @@ -2,6 +2,8 @@ package main import ( "encoding/json" + "errors" + "io" "os" "path/filepath" "strings" @@ -41,6 +43,9 @@ func LoadConfig() error { cfg := &Config{} if err := json.NewDecoder(file).Decode(cfg); err != nil { + if errors.Is(err, io.EOF) { + return nil + } return err }