add fallback apple list

This commit is contained in:
Seraphim Strub 2024-01-28 19:52:00 +00:00
parent df46e6f4bd
commit 53a2b91f9e
4 changed files with 11 additions and 25 deletions

View file

@ -38,3 +38,12 @@ func LoadAppleList() error {
log.Printf("DEBUG: loaded apple list of lenght: %v", len(AppleList))
return nil
}
func FallbackAppleList() {
AppleList = []string{
"Braeburn",
"Gala",
"Golden Delicious",
"Honeycrisp",
}
}

View file

@ -26,7 +26,7 @@ func main() {
err := config.LoadAppleList()
if err != nil {
logger.Error("could not load apple list", slog.Any("error", err))
return
config.FallbackAppleList()
}
// permissions: Manage Channels