Skip to content

Commit

Permalink
pointers and errors are done, hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
quii committed Apr 1, 2018
1 parent 2c01b8a commit f9582d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pointers/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pointers and errors (WIP)
# Pointers and errors

We learned about structs in the last section which let us capture a number of values related around a concept.

Expand Down Expand Up @@ -564,9 +564,9 @@ You should get something like

`wallet_test.go:17:18: wallet.Withdraw(Bitcoin(10))`

What this is telling us is that we have not checked the error being returned on that line of code. That line of code on my computer corresponds to our normal withdraw scenario because we have not checked that if the Withdraw is successful that an error is _not_ returned.
What this is telling us is that we have not checked the error being returned on that line of code. That line of code on my computer corresponds to our normal withdraw scenario because we have not checked that if the `Withdraw` is successful that an error is _not_ returned.

Here is the final test code that accounts for this
Here is the final test code that accounts for this.

```go
func TestWallet(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If there's no link, it's not done yet! [why not contribute?](contributing.md)
3. [Iteration](/for) - Learn about `for` and benchmarking.
4. [Arrays and slices](/arrays) - Learn about arrays, slices, `len`, varargs, `range` and test coverage.
5. [Structs, methods & interfaces](/structs) - Learn about `struct`, methods, `interface` and table driven tests.
6. [Pointers & errors(WIP)](/pointers) - Learn about pointers, errors, type assertions and type aliasing.
6. [Pointers & errors](/pointers) - Learn about pointers, errors and type aliasing.
7. [Dependency Injection & interfaces (WIP)](/di-and-interfaces) - Learn about dependency injection, how it relates to using interfaces and a primer on io
8. Concurrency (WIP)
9. Errors
Expand Down

0 comments on commit f9582d0

Please sign in to comment.