Skip to content
A library providing ISO4217 currency codes and minor units
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd damn you, trailing comma! Jan 31, 2019
.gitignore Initial commit Jul 3, 2018
Makefile Initial commit Jul 3, 2018
README.md Initial commit Jul 3, 2018
std.go Adds support for swift Jan 31, 2019
std.swift damn you, trailing comma! Jan 31, 2019

README.md

currency

This package generates structs containing all the up-to-date ISO4217 currency codes and minor units, along with a very simple validator.

Data is graciously provided by:

Usage:

package main

func main() {
	// Validation of codes.
	ok := currency.Valid("ABC")
	if !ok {
		// whatever you need.
	}

	// easy to get the values
	fmt.Println(currency.USD.Code())
	// Output: USD

	fmt.Println(currency.USD.MinorUnit())
	// Output: 2
}
You can’t perform that action at this time.