Banking related library.
go get -u github.com/jacoelho/banking
Supports IBAN validation based on swift rules.
err := iban.Validate("SOME IBAN")
result, err := iban.ReplaceChecksum("GB99NWBK60161331926819")
// Output: GB29NWBK60161331926819
iban, err := iban.Generate("GB")
// Output: GB29NWBK60161331926819
iban.PaperFormat("GB29NWBK60161331926819"))
// Output: GB29 NWBK 6016 1331 9268 19
// Get BBAN from IBAN
result, _ := iban.GetBBAN("GB29NWBK60161331926819")
fmt.Println(result.BBAN, result.BankCode, result.BranchCode, result.AccountNumber)
// Output: NWBK60161331926819 NWBK 601613 31926819
// IsSEPA returns if an iban country is a SEPA member
result, _ := iban.IsSEPA("GB29NWBK60161331926819")
fmt.Println(result)
// Output: true
Mod-97-10 implemented.
cd registry
go install -v ./...
cd ..
./bin/generator -registry-file ./docs/registry.yml
MIT License
See LICENSE to see the full text.