Skip to content
Banking library written in Go.
Go Makefile
Branch: master
Clone or download

Latest commit

Juraj Bubniak
Latest commit fe210fc Jan 5, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bban Add support for bban.Zero. Jan 5, 2020
country Add support for bban.Zero. Jan 5, 2020
iban Fix Costa Rica iban. Jan 5, 2020
swift Fix AlphaNum validation. Jan 5, 2020
.drone.yml Setup linter. Jan 2, 2020
.gitignore Add Makefile Jan 2, 2020
.golangci.yml Setup linter. Jan 2, 2020
CHANGELOG.md Update CHANGELOG for 0.4.0. Jan 5, 2020
LICENSE Welcome 2019. Feb 28, 2019
Makefile Add Makefile Jan 2, 2020
README.md Deprecate New and use Parse instead. Jan 2, 2020
doc.go Deprecate New and use Parse instead. Jan 2, 2020
go.mod Rewrite tests using testify/require. Jan 2, 2020
go.sum Rewrite tests using testify/require. Jan 2, 2020

README.md

banking

GoDoc Build Status Go Report Card

Banking library for Go.

Install

go get github.com/jbub/banking

Docs

http://godoc.org/github.com/jbub/banking

Iban

package main

import (
    "fmt"
    "log"

    "github.com/jbub/banking/iban"
)

var (
    testIban = iban.MustParse("BE68539007547034")
)

func main() {
    ibn, err := iban.Parse("BE68539007547034")
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(ibn.BankCode())
    fmt.Println(ibn.AccountNumber())

    err = iban.Validate("BE68539007547034")
    if err != nil {
        log.Fatal(err)
    }
}

Swift

package main

import (
    "fmt"
    "log"

    "github.com/jbub/banking/swift"
)

var (
    testSwift = swift.MustParse("DEUTDEFF500")
)

func main() {
    swft, err := swift.Parse("DEUTDEFF500")
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(swft.BankCode())
    fmt.Println(swft.CountryCode())

    err = swift.Validate("DEUTDEFF500")
    if err != nil {
        log.Fatal(err)
    }
}
You can’t perform that action at this time.