learn-go-with-tests icon indicating copy to clipboard operation
learn-go-with-tests copied to clipboard

Shift in mod and import styles is confusing

Open leighstillard opened this issue 3 years ago • 1 comments

Hi there,

Around about the math section the style changes from using a single module across both the test and main file to using a mod for each. The shift isn't explained as far as I can tell, and the code examples reference files in this repo - which from my experience doesn't work well when transcribing or copying code to learn.

Is there a good practice reason for the switch? It would help to explain the transition.

I submitted a PR to 'fix' the maths section but on further consideration I'm not confident that was the right thing to do.

leighstillard avatar Feb 19 '22 00:02 leighstillard

It's just a function of it all growing organically, that particular chapter was also not written by me! I confess I haven't looked at that chapter in a long time, so I'll try and find some time at some point. The setup with go mod these days is relatively straightforward so hopefully not too much of a chore to fix. Thanks for raising

quii avatar Feb 19 '22 08:02 quii