Documentation
¶
Index ¶
- type Amount
- type Calculator
- type Currencies
- type Currency
- type Formatter
- type Money
- func (m *Money) Absolute() *Money
- func (m *Money) Add(om *Money) *Money
- func (m *Money) Allocate(rs []int) []*Money
- func (m *Money) Divide(div int) *Money
- func (m *Money) Equals(om *Money) bool
- func (m *Money) Format() string
- func (m *Money) GreaterThan(om *Money) bool
- func (m *Money) GreaterThanOrEqual(om *Money) bool
- func (m *Money) IsNegative() bool
- func (m *Money) IsPositive() bool
- func (m *Money) IsZero() bool
- func (m *Money) LessThan(om *Money) bool
- func (m *Money) LessThanOrEqual(om *Money) bool
- func (m *Money) Multiply(mul int) *Money
- func (m *Money) Negative() *Money
- func (m *Money) Round() *Money
- func (m *Money) SameCurrency(om *Money) bool
- func (m *Money) Split(n int) []*Money
- func (m *Money) Subtract(om *Money) *Money
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type Calculator struct{}
type Currencies ¶
type Formatter ¶
type Formatter struct {
Fraction int
Decimal string
Thousand string
Grapheme string
Template string
}
func NewFormatter ¶
type Money ¶
func (*Money) GreaterThan ¶
func (*Money) GreaterThanOrEqual ¶
func (*Money) IsNegative ¶
func (*Money) IsPositive ¶
func (*Money) LessThanOrEqual ¶
func (*Money) SameCurrency ¶
SameCurrency check if given Money is equals by currency
Click to show internal directories.
Click to hide internal directories.
