command module
Version: v0.0.0-...-7b96a29 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2018 License: MIT Imports: 3 Imported by: 0


Build Status Go Report Card codebeat badge CircleCI GoDoc


Go libraries for validating banking data (account or card numbers)


func IsIBAN(account string) bool

Returns true if account is a valid IBAN number

func FormatIBAN(iban string, verify bool) (formatted string, err error)

Returns formatted IBAN. If verify is set to true, perform IBAN validation first (by calling IsIBAN)


func IsLuhn(number string) bool

Returns true if number passes the Luhn validation

Running the example

Follow instructions to install go. Once you have Go up and running, you can download, build and run the example using the following commands.

$ go get


$ go get

then, assuming you have $GOPATH environmental variable set

$ cd $GOPATH/src/
$ go run example.go

Running tests

$ cd $GOPATH/src/
$ go test -v
$ go test -bench=.
$ go test -count 4 -benchmem -bench=.

$ cd $GOPATH/src/
$ go test -v
$ go test -bench=.
$ go test -count 4 -benchmem -bench=.


The Go Gopher

There is no documentation for this package.

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL