Add Pi-hole blocked percentage and date widgets
This commit is contained in:
@@ -8,14 +8,14 @@ import (
|
||||
|
||||
func LoadConfig(config interface{}) {
|
||||
if err := toml.Unmarshal(readFile("config.toml"), config); err != nil {
|
||||
panic(err)
|
||||
config = nil
|
||||
}
|
||||
}
|
||||
|
||||
func readFile(path string) []byte {
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
return make([]byte, 0)
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user