currency

package
v0.30.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2020 License: AGPL-3.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type USD

type USD struct {
	// contains filtered or unexported fields
}

USD describes USD currency.

func Cents

func Cents(cents int) USD

Cents converts cents to USD amount.

func Dollars

func Dollars(dollars int) USD

Dollars converts dollars to USD amount.

func (USD) Add

func (usd USD) Add(b USD) USD

Add adds two usd values and returns the result.

func (USD) Cents

func (usd USD) Cents() int

Cents returns amount in cents.

func (USD) String

func (usd USD) String() string

String returns the value in dollars.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL