Skip to content

Commit

Permalink
allow comments in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
neolynx committed Oct 4, 2024
1 parent 26109fc commit 36ce80e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"os"
"path/filepath"
"strings"

"github.com/DisposaBoy/JsonConfigReader"
)

// ConfigStructure is structure of main configuration
Expand Down Expand Up @@ -192,7 +194,7 @@ func LoadConfig(filename string, config *ConfigStructure) error {
}
defer f.Close()

dec := json.NewDecoder(f)
dec := json.NewDecoder(JsonConfigReader.New(f))
return dec.Decode(&config)
}

Expand Down

0 comments on commit 36ce80e

Please sign in to comment.