quii / learn-go-with-tests

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

The arguments types shorthand syntax is wrongly/awkwardly introduced #759

Closed dario-piotrowicz closed 4 months ago

dario-piotrowicz commented 6 months ago

It is quite minor, anyways I've noticed that in the integers section (which comes after the hello-world one), the arguments types shorthand syntax is introduced/explained: https://github.com/quii/learn-go-with-tests/blob/e759bc10ba1c670778019d53eb18283165c50dc5/integers.md?plain=1#L61-L66

What I think is wrong is that the syntax was already used in the hello-world section (but not explained there): https://github.com/quii/learn-go-with-tests/blob/e759bc10ba1c670778019d53eb18283165c50dc5/hello-world.md?plain=1#L303

So the guide is initially using the syntax in the hello-world section without explaining it and it later introduces it.

I think that this could be improved by either: