money

package
v0.1.299 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	BankersRound(ctx context.Context, amount float64) (int64, error)
}

func NewClient

func NewClient() Client

type DefaultTool added in v0.1.11

type DefaultTool struct {
	T *contract.Tool[Client]
}

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool

func (*DefaultTool) BankersRound added in v0.1.11

func (d *DefaultTool) BankersRound(ctx context.Context, amount float64) (int64, error)

BankersRound applies Banker's Rounding to a float64 monetary amount.

type Tool added in v0.1.245

type Tool interface {
	Client
}

Jump to

Keyboard shortcuts

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