Documentation ¶ Overview ¶ Package money provides support for converting between currencies. Index ¶ func ConvertWithRates(rates map[string]float64, from string, to string, value float64) (float64, error) type Converter func NewConverter(rates map[string]float64) *Converter func (c *Converter) Convert(from string, to string, value float64) (float64, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ConvertWithRates ¶ func ConvertWithRates(rates map[string]float64, from string, to string, value float64) (float64, error) Types ¶ type Converter ¶ type Converter struct { Rates map[string]float64 } A Converter is used to convert between currencies using known exchange rates func NewConverter ¶ func NewConverter(rates map[string]float64) *Converter func (*Converter) Convert ¶ func (c *Converter) Convert(from string, to string, value float64) (float64, error) Convert uses Rates on Converter to exchange from one currency to another. Source Files ¶ View all Source files doc.go money.go Click to show internal directories. Click to hide internal directories.