-
-
Couldn't load subscription status.
- Fork 2.9k
Open
Description
Love the series, thanks for taking the time to make it.
In this refactor: https://github.com/quii/learn-go-with-tests/blob/main/arrays/v7/sum_test.go
...
checkSums := func(t testing.TB, got, want []int) {
...
The expected parameter is the interface type, whereas all versions in the code repo use a pointer to type T:
- https://github.com/quii/learn-go-with-tests/blob/main/arrays/v7/sum_test.go
- https://github.com/quii/learn-go-with-tests/blob/main/arrays/v8/sum_test.go
...
checkSums := func(t *testing.T, got, want []int) {
...
Since interfaces aren't covered until the next chapter and the example code differs from the documentation, it wasn't clear if this was intentional or not.
Metadata
Metadata
Assignees
Labels
No labels