From 275c8097cee1cdffad1e81f041e6e2487d36eac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20M=C3=B6ller?= Date: Wed, 9 Feb 2022 19:00:25 +0100 Subject: [PATCH] fix: Correct flag validation logix --- cmd/meals.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/meals.go b/cmd/meals.go index a8426ac..be11dca 100644 --- a/cmd/meals.go +++ b/cmd/meals.go @@ -40,10 +40,10 @@ If the filter is empty, all facilities are fetched. The filter is matched agains if mealsGroupFlag != "" && mealsFilterFlag != "" { return fmt.Errorf("cannot use both --group and --filter") } - if mealsDinnerFlag && mealsDaytimeFlag == "" { + if mealsDinnerFlag && mealsDaytimeFlag != "" { return fmt.Errorf("cannot use both --dinner and --daytime") } - if mealsLunchFlag && mealsDaytimeFlag == "" { + if mealsLunchFlag && mealsDaytimeFlag != "" { return fmt.Errorf("cannot use both --lunch and --daytime") } if mealsLunchFlag && mealsDinnerFlag {