Return empty arrays rather than null

This commit is contained in:
2022-10-29 14:40:18 +02:00
parent 90b4ae7e75
commit b57959ac73
4 changed files with 16 additions and 1 deletions
+4
View File
@@ -8,6 +8,10 @@ type Menu struct {
day string
}
func MakeMenuDefault() Menu {
return Menu{make([]Meal, 0), true, ""}
}
func MakeMenu(meals []Meal, day string) Menu {
return Menu{meals, true, day}
}