News for hackers. Stuff that matters.
Re:Ask HN: Why does every package+module system become a Rub... by Cieric on Monday January 30, 2023 @12:12PM (#34582901)
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... [2] https://stackoverflow.com/questions/57806081/how-to-access-n...

Re:Ask HN: Why does every package+module system become a Rub... by metaltyphoon on Monday January 30, 2023 @12:26PM (#34583158)
Now a days you can use go workspaces to do this so you don't have to modify your go.mod files anymore.
Re:Ask HN: Why does every package+module system become a Rub... by Cieric on Monday January 30, 2023 @01:08PM (#34583869)
Thanks for the info, I'll look into that the next time I pick up go again.