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.

forgot to mention that Im literally starting to learn go. Just cherry on top

  • 3
    From php to go, is a head fuck at best, but it's a good one once you get over it 😅


    Scroll down to the Go workshop, it's quite detailed.
  • 1

    Thanks. I took go tour but it's nowhere as helpfull as I hoped it would be.

    At least I know syntax (and lack of semicolons feels weird if not wrong).
  • 1
    Should've been around for gopath and go get lol. It would've been 9 to 17.
  • 1
    That's why you shouldn't over simplify your programming language. Because it turns into a cluster fuck that's the opposite of easy
  • 0

    I absolutely agree. I think it's better to have few explicit lines more, that allow more flexibility (or flexibility without looking for fixes / workarounds) or verbousity that allows easier understanding or debugging/fixing etc...
Add Comment