status-go/vendor/github.com/ladydascalie/currency
dlipicar 1d1a95091d
feat: implement currency formatting calculation (#3191)
2023-02-17 11:11:07 -03:00
..
.gitignore feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00
LICENSE feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00
Makefile feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00
README.md feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00
std.go feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00
std.kt feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00
std.swift feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00
std_currency.js feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00

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
}