IBAN: Difference between revisions

→‎{{header|Go}}: Code was wrong for iban CH93 0076 2011 6238 5295 7 (numbers in second block)
(→‎{{header|Go}}: Create Go entry)
(→‎{{header|Go}}: Code was wrong for iban CH93 0076 2011 6238 5295 7 (numbers in second block))
Line 1,235:
)
 
var lCode = map[string]int {
"AL": 28, "AD": 24, "AT": 20, "AZ": 28, "BE": 16, "BH": 22, "BA": 20, "BR": 29,
"BG": 22, "CR": 21, "HR": 21, "CY": 28, "CZ": 24, "DK": 18, "DO": 28, "EE": 20,
Line 1,247:
 
var sCode = map[string]int {
"1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9,
"A": 10, "B": 11, "C": 12, "D": 13, "E": 14, "F": 15, "G": 16,
"H": 17, "I": 18, "J": 19, "K": 20, "L": 21, "M": 22, "N": 23,
Line 1,261 ⟶ 1,262:
w := new(big.Int)
iban = "GB82 WESTTEST 1234 5698 7654 32"
r = strings.Split(iban, " ")
s = strings.Split(r[0], "")
Line 1,291 ⟶ 1,292:
IBAN GB82 WEST 1234 5698 7654 32 looks good!
IBAN GB82 TEST 1234 5698 7654 32 looks wrong!
IBAN CH93 0076 2011 6238 5295 7 looks good!
</pre>
 
Anonymous user