4 ms·
Not the one you we're replying to, but I have an idea of the arcane magic he might be referring to. Back when I started learning Go I wanted to make a few examp
by Cieric 4y ago
Not the one you we're replying to, but I have an idea of the arcane magic he might be referring to. Back when I started learning Go I wanted to make a few example projects to test how well the language works, but I didn't want to push anything anywhere. When I tried to break my project into modules it ended up being that I needed to give them fake urls or something and then tell it to redirect the fake url to a folder instead. This[1] and this[2] gives a good example of the stuff I was running into at the time. I also realize that I should have probably been using sub-packages and not sub-modules, but coming from other languages I didn't realize they were suppose to be different. The thing that screwed with me most though was that there were half solutions for sub-modules to work so I kept using that terminology when searching google.
[1] https://stackoverflow.com/questions/10687627/relative-import-from-parent-directory https://stackoverflow.com/questions/10687627/relative-import...
[2] https://stackoverflow.com/questions/57806081/how-to-access-nested-modules-submodules-in-go https://stackoverflow.com/questions/57806081/how-to-access-n...
- metaltyphoon 4y agoNow a days you can use go workspaces to do this so you don't have to modify your go.mod files anymore.
- Cieric 4y agoThanks for the info, I'll look into that the next time I pick up go again.