Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation [arrays] doesn't match example code #845

Open
rbellabre opened this issue Feb 10, 2025 · 0 comments
Open

Documentation [arrays] doesn't match example code #845

rbellabre opened this issue Feb 10, 2025 · 0 comments

Comments

@rbellabre
Copy link

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:

... 
	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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant