allow comments in config file

This commit is contained in:
André Roth
2024-10-04 01:54:34 +02:00
parent ba86851d07
commit cc1fc7ccfe
+3 -1
View File
@@ -6,6 +6,8 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/DisposaBoy/JsonConfigReader"
) )
// ConfigStructure is structure of main configuration // ConfigStructure is structure of main configuration
@@ -192,7 +194,7 @@ func LoadConfig(filename string, config *ConfigStructure) error {
} }
defer f.Close() defer f.Close()
dec := json.NewDecoder(f) dec := json.NewDecoder(JsonConfigReader.New(f))
return dec.Decode(&config) return dec.Decode(&config)
} }