Skip to content

mpwalkerdine/money

Repository files navigation

Money

Godoc Go Report Card

import "github.com/mpwalkerdine/money"

Package money is a convenience wrapper for github.com/ericlagergren/decimal.

It makes decimal values returned from this package immutable, at the expense of reduced memory efficiency. See https://golang.org/pkg/math/big/ for why the API is designed in the way it is. We forego that benefit in calling code, but where possible this package will attempt to minimise allocations during calculations. In the majority of cases however, monetary values fit inside the compact uint64 value used by the underlying decimal package.