3

What the fuck is the "package management" of Golang.
It is impossible to delete a fucking dependency and why do I have to do that shit in the first place, I just want to use a fucking fork of my own. It's hilarious.

Comments
  • 3
    What do you mean, just use a huge mono repo for your entire billion dollar company, very good practice
  • 3
    Yup.
    Read the fuckimg manual.

    in short: you can graph the dependencies using the command line. Then you can grep across the project to find where you used the pkg you want removed. then remove it, and tidy the thing.
  • 1
    @magicMirror
    I tried that. go clean -i <path just as I use it in the file> dosent work. Maybe I'm just to stupid for this high level stuff.
  • 0
    @ExtremNerd eh...
    no?
    you use "go mod graph" or "go mod why"
    to understand why a lib is used. It will help you locate where the lib is used. Hint - it might be a another lib you are using. Then you refactor the problem code areas to remove the dependency. only when done, you run "go mod tidy" to update the go.mod file.

    GL!
  • 1
    @magicMirror
    That was the best I could find.
    Tanks for the hint, seems reasonable to look into the dependency usage.
    My last take was to use the replace option on the cli. It's really hard to find useful information.
    Thanks, I'll give it a shot.
  • 0
    @ExtremNerd
    Meh.
    You can also use a replace directive in the go.mod, and watch the project break when you compile.
    The info is on SO, and the official godocs - but.... you need to ask the right question to find it, as this topic is advanced.
    Also - go libs with c-bindings, and runtime panic for 1.18 upgrade were lots'o'fun.
Add Comment