quii / learn-go-with-tests

Learn Go with test-driven development
MIT License
22.21k stars 2.81k forks source link

Added missing return statement to pointers-and-errors.md #698

Closed Karwasze closed 1 year ago

Karwasze commented 1 year ago

The code does not return the expected result, instead it throws a a different error:

# learn-go-with-tests/pointers [learn-go-with-tests/pointers.test] ./wallet.go:10:1: missing return
FAIL    learn-go-with-tests/pointers [build failed]
quii commented 1 year ago

I don't believe the intention is for Deposit to return the balance. Your code wouldn't compile anyway as it doesn't have a return type.