diff --git a/pkg/restaurants/restaurant.go b/pkg/restaurants/restaurant.go index d46de68..7f3e577 100644 --- a/pkg/restaurants/restaurant.go +++ b/pkg/restaurants/restaurant.go @@ -55,6 +55,10 @@ func (restaurant *Restaurant) clearMenus() { } } +func (restaurant *Restaurant) clearPermanentMenus() { + restaurant.permanent = []Meal{} +} + func (restaurant *Restaurant) MarshalJSON() ([]byte, error) { return json.Marshal(&RestaurantJSON{ Id: restaurant.id, diff --git a/pkg/restaurants/tao.go b/pkg/restaurants/tao.go index 14154ba..fd9c0af 100644 --- a/pkg/restaurants/tao.go +++ b/pkg/restaurants/tao.go @@ -24,6 +24,7 @@ func NewTaoRestaurant(url string, name string, id int) *TaoRestaurant { func (restaurant *TaoRestaurant) Parse() { restaurant.clearMenus() + restaurant.clearPermanentMenus() resp, err := http.Get(restaurant.url) if err != nil { return