Documentation
¶
Overview ¶
package corfin provides methods to check the validity of an International Securities Identification Number (ISIN)
Example ¶
package main
import (
"fmt"
"cmdscale.com/corfin"
)
func main() {
isin, err := corfin.NewISIN("DE000BAY0017") // non alphanumeric characters will be removed
if err != nil {
panic(err)
}
fmt.Println("ISIN:", isin.String())
}
Output: ISIN: DE000BAY0017
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckDigitError ¶
CheckDigitError indicates that the checksum did not match the expected check digit.
func (CheckDigitError) Error ¶
func (e CheckDigitError) Error() string
type CountryCode ¶
type CountryCode string
CountryCode is the ISO 3166-1 alpha-2 code of the country (uppercase)
type ISIN ¶
type ISIN struct {
CountryCode CountryCode
// National Securities Identifying Number
NSIN string
CheckDigit int
}
ISIN represents an International Securities Identification Number
type ISINValidator ¶
ISINValidator makes additional checks on a given ISIN.
Click to show internal directories.
Click to hide internal directories.