Skip to content

Commit

Permalink
fix: Correct flag validation logix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmoellerch committed Feb 9, 2022
1 parent d9f2cea commit 275c809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/meals.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 275c809

Please sign in to comment.