Skip to content

Any reason for Amount being a data-structure?  #73

@christianschmizz

Description

@christianschmizz

Would s/o please explain to me why Amount is a struct and not just a type alias which I expected to be more simple and sufficient?

// Amount is a datastructure that stores the amount being used for calculations.
type Amount struct {
	val int64
}

It seems more odd when I saw when the Amount is fetched we are getting the value.

func (m *Money) Amount() int64 {
	return m.amount.val
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions