money

package module
v0.0.0-...-c46f048 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: MIT Imports: 5 Imported by: 0

README

money

It is a money struct with Go Lang. It represent a CAD struct for Canadian Dollor Money Type.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CAD

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

func Cents

func Cents(n int64) CAD

func ParseCAD

func ParseCAD(s string) (CAD, error)

func (CAD) Abs

func (receiver CAD) Abs() CAD

func (CAD) Add

func (receiver CAD) Add(other CAD) CAD

func (CAD) AsCents

func (receiver CAD) AsCents() int64

func (CAD) CanonicalForm

func (receiver CAD) CanonicalForm() (int64, int64)

func (CAD) GoString

func (receiver CAD) GoString() string

func (CAD) MarshalJSON

func (receiver CAD) MarshalJSON() ([]byte, error)

func (CAD) Mul

func (receiver CAD) Mul(scalar int64) CAD

func (*CAD) Scan

func (receiver *CAD) Scan(src interface{}) error

func (CAD) String

func (receiver CAD) String() string

func (CAD) Sub

func (receiver CAD) Sub(other CAD) CAD

func (*CAD) UnmarshalJSON

func (receiver *CAD) UnmarshalJSON(b []byte) error

func (CAD) Value

func (receiver CAD) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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