Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iban/national_checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,5 +336,5 @@ func luhn(s string) int {
sum = (sum + n) % 10
}

return 10 - sum%10
return (10 - sum%10) % 10
}
1 change: 1 addition & 0 deletions iban/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func TestParse(t *testing.T) {
{In: "EE44 3300 3384 0010 0007", Expect: "EE44 3300 3384 0010 0007"},
{In: "FI21 1234 5600 0007 85", Expect: "FI21 1234 5600 0007 85"},
{In: "FI14 1009 3000 1234 58", Expect: "FI14 1009 3000 1234 58"},
{In: "FI32 9360 7346 0370 70", Expect: "FI32 9360 7346 0370 70"},
{In: "FR14 2004 1010 0505 0001 3M02 606", Expect: "FR14 2004 1010 0505 0001 3M02 606"},
{In: "FR76 3000 6000 0112 3456 7890 189", Expect: "FR76 3000 6000 0112 3456 7890 189"},
{In: "HU42 1177 3016 1111 1018 0000 0000", Expect: "HU42 1177 3016 1111 1018 0000 0000"},
Expand Down