Add Pi-hole blocked percentage and date widgets

This commit is contained in:
2025-12-22 20:45:55 +01:00
parent 2315ac2ce7
commit 7b6a8bbaab
7 changed files with 111 additions and 7 deletions

View File

@@ -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
}