Ensures that the check-digit of a given International Securities Identification Numbers (ISIN) is correct:
package main
import "fmt"
import "cmdscale.com/corfin"
func main() {
isin, err := corfin.NewISIN("DE000BAY0017") // non alphanumeric characters will be ignored
if err != nil {
fmt.Println(err) // isin is invalid
}
fmt.Println("ISIN is well-formed", isin.String())
}
go get cmdscale.com/corfin
BSD 3-Clause "New" or "Revised" License