Any reason for Amount being a data-structure?
christianschmizz opened this issue · 1 comments
christianschmizz commented
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
}
Rhymond commented
good point, you're right it would be more sufficient to use type alias instead