This is a half-joke post after stepping on the official package manager, Go dep (harmless, just watch it :).
The “package manager” problem of Go has not been solved effectively. When PIP and NPM are flying in the sky, package management of Go is like crawling on the ground.
Of course you can mindlessly go get. After all, it’s built in. However, when it comes to teamwork, because Go Get has no control over the “versioning semantics” of dependent packages, there’s a good chance that someone else won’t have 100% of your environment. And that’s where some weird bugs come in. So what can you do to be 100% reliable? Commit the source code of the dependent package directly to Git, so that the dependent package becomes part of the version management. Well, it’s a silly way to do it, it’s crude and it can’t go wrong, and one team I worked on did it (projects rarely upgrade dependent packages).
However, many people feel that it is Stupid to commit the source code of third-party packages to Git. (Do you dare to submit node_modules to Git?) As a result, various “community solutions” have emerged. For example, if you’re lucky, you can search for article titles like:
- Why I Use Godep?
- Why Glide is Better than Godep?
- Migrate from godep
balabala…
“With so many solutions, I am really picky.” “You sigh. If, for some reason, you change teams (probably at different companies) that write Go, you’ll probably need to use all of these package managers at once. “The most important thing is to participate in. It is not difficult anyway. It is always best to learn more knowledge.” Big V programmers teach you that.
Yeah, it’s not hard. It doesn’t take long. However, the subject of your complaint may be something like “A package manager, a package manager. Shouldn’t it be the language itself? Shouldn’t it be the official dictatorship? But the big V programmers didn’t get it, thinking “This young man is impetuous and unwilling to learn.”
So, Go DEp comes out. There are also several articles about how complex package management is and how awesome the DEP tool is. If, like me, you’re a white guy who has no motivation to understand how complicated and awesome this is, try to worship the big guy, offer him tea, and you’re done. However, the Go DEp tool has not fully entered the official tool chain, and the way of use is a little strange.
“It’s okay, there’s going to be an article about why it’s awesome, because Go doesn’t have a lot of features, and you’re a mindless fan, too. 🙂 “you think. (There is absolutely no black meaning, I have written enough Go code, is if err! = nil a bit of hand pain).
For someone who only knows NPM install, there is no motivation to understand the ins and outs of NPM, but it may take a long time to Google the Go language. So, I really miss NPM.
“Clearly there are so many awesome bosses, clearly is so painful pain point, how no one found & ridicule, only I this little white just feel, this is an” elephant in the room “? Wait, is my intelligence not enough ability not good?” In a tired afternoon, you have a feeling.
“Well, it must be me.”