money

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package money is a simple currency package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Money

type Money int64

Money represent a monetary value in decimal format, ie $1 = 100.

func New

func New(amount float64) Money

New returns a Money representation of a float; max value is one hundred trillon.

func (Money) String

func (m Money) String() string

String implements the stringer interface for Money.

func (Money) Tax

func (m Money) Tax(rate float64) Money

Tax calculates the amount of tax given the rate on a Money amount.

func (Money) WithTax

func (m Money) WithTax(rate float64) Money

WithTax returns the amount with tax included.

Jump to

Keyboard shortcuts

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