Add Debug option to the config

This commit is contained in:
null31 2024-09-24 22:23:04 +02:00
parent 5888a7821b
commit a0cc3c3e0a
Signed by: null31
GPG Key ID: CAB4CF4EE49720FF
2 changed files with 3 additions and 1 deletions

View File

@ -5,5 +5,6 @@
"nickname": "Some_nick", "nickname": "Some_nick",
"channels": ["#channel", "#channel2"], "channels": ["#channel", "#channel2"],
"geoip_database": "/app/geolite2-city.mmdb", "geoip_database": "/app/geolite2-city.mmdb",
"geoip_asn": "/app/geolite2-asn.mmdb" "geoip_asn": "/app/geolite2-asn.mmdb",
"debug": false
} }

View File

@ -14,6 +14,7 @@ type Config struct {
Channels []string `json:"channels"` Channels []string `json:"channels"`
GeoIPDatabase string `json:"geoip_database"` GeoIPDatabase string `json:"geoip_database"`
GeoIPASN string `json:"geoip_asn"` GeoIPASN string `json:"geoip_asn"`
Debug bool `json:"debug"`
} }
func LoadConfig(file string) (Config, error) { func LoadConfig(file string) (Config, error) {