Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "go.mod"
-
So,
Im coming from PHP. I feel comfy around PHP.
I needed for other project GO lang (there is no library for what I need to do in PHP, and it's low level thing anyway)
I need dependency that is in form of modules.
Okay, so importing it (just writing import "github.com/blah/blah/v3/blah" as suggested in docs did not work. something something, not found)
Some googling later, I created go.mod file.
And all the hell broke lose. So I am trying to fix that using random stack overflow, IDE highlights entire project on red, go complains it can't find "./" while it looks for it in gopath not project files and claims it's remote repository.
Among other WTFnessness after adding go.mod it suddenly stopped fetching ANY dependencies (including stuff like github.com/pkg/errors ), so, that's fun...
I added go.mod before 9 AM.
It's 13 and Im still wrestling with this
I fail to connect the dots why go lang get's so much praise for it's apparently awesome or something package managment... I find "composer install", and have pretty much guarantee it will work, much easier to wrap my head around.
[edit]
forgot to mention that Im literally starting to learn go. Just cherry on top5 -
OH, OKAY! that's what I should have do like 4 hours ago. Well, today I learned more of what can `replace` do in Golang modules.2