Skip to content

Commit

Permalink
Merge pull request #359 from SalehBorhani/main
Browse files Browse the repository at this point in the history
fix: change the condition in checkEven function
  • Loading branch information
Ja7ad authored May 23, 2024
2 parents 48fbd2b + 8ce8a66 commit 64b68d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/chapter 2/2.6-error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func checkPositive(num int) error {
}

func checkEven(num int) error {
if num%2 == 1 {
if num%2 != 1 {
return notEven{num: num}
}
return nil
Expand Down

0 comments on commit 64b68d8

Please sign in to comment.