Managing dependencies in Go is a pain vs Python, it's honestly my biggest complaint with Go.
Discussion
why? I just feel exactly the opposite! Also, deploying Python is a nightmare, while deploying Go is (almost always) just copying a binary.
With Python I just import what I need and install it with pip. Done.
With Go I run go get and get an error saying it's depreciated. Oh I need to change my directory and edit go.mod and ignore the errors about GOHOME because that's being phased out and run go mod tidy a few times and hope it works.
You're absolutely right wrt deploying tho, it's definitely much easier to compile a language that's designed to be compiled haha.
don't want to start a programming language war here, but I have to object every single thing you wrote 😄
1. With Go you just need to do "go get" and stop. No need to do "go tidy" (unless you imported something that you don't want to use anymore), no need to care about GOHOME and, unless you need to do something unusual, no need to manually edit go.mod;
2. don't know what error about being deprecated you encountered, could you be more specific?
3. the point about deploy is not just related to be compiled. It is about HOW it is compiled, or better, linked. A Go binary is almost always a statically linked binary, that means that has no dependency on specific system library version. So I can compile my Go binary on the latest Fedora and deploy it on the oldest CentOS I still have in production. Also, I can cross compile to several architectures and OS without installing any external tool.
4. With python you have so many issues deploying a script. You have to care about:
a) the Python version because they break compatibility every time (Go never broke backward compatibility since it was release btw)
b) for every non trivial task in Python you need to have several system library installed, gcc, g++, a fortan compiler and god knows what else.
source: my pythonic collegues spend 10% of their time writing code and the rest trying to deploy it in production.
Whenever I run go get it gives me an error saying it's depreciated. I gotta add stuff to the mod.go to make it grab dependencies. I always end up troubleshooting whenever I need to use a third party library in Go. Rarely is that true of Python, usually pip install just works.
I do agree with you wrt deploying to prod. This is why I'm learning Go in the first place. Python is more designed to script stuff on the backend. For deploying to prod, Go is clean. It's a better tool for writing frontend facing prod software.
And don't worry about disagreeing man I love a good debate!
that's strange mate, go get is the proper way to get dependencies and should work smoothly without errors or warnings. There are probably issues with your environment. If you're running on Linux or MacOS and you'd like to, I can try to help you via DM. No idea on what Windows do tho