go-by-test/wallet/wallet.go

14 lines
167 B
Go
Raw Normal View History

package wallet
type Wallet struct {
balance int
}
func (w *Wallet) Deposit(units int) {
w.balance += units
}
func (w *Wallet) Balance() int {
return w.balance
}