What are go mod, go get and go mod vendors?

I'm just getting started with Go and I'm not sure about go mod, go get and go mod vendor

Please note that it is highly possible that you are wrong.

Is the go.mod file something like Gemfile or package.json and the go.sum file like Gemfile.lock or package.lock.json?

go get package name writes the package name to go.mod and go.sum

Does go get -u package name update the version of the package written in go.mod and go.sum?

In other words, the procedure is the reverse of adding the desired gem to the Gemfile and doing bundle install to import the gem, and then go get the desired package and it will be automatically written to go.mod or go.sum?

Can you copy the package described in the file to go.mod under vendor with go mod vendor?

Recommended Posts

What are go mod, go get and go mod vendors?
What are "sudo ln -s" and "ln -s"?
(Beginner) What are cores and threads?
What are Linux POSIX options and GNU options?
Training data and test data (What are X_train and y_train?) ①
Training data and test data (What are X_train and y_train?) ②
[Mathematics] Let's visualize what are eigenvalues and eigenvectors
What are you comparing with Python is and ==?
What are python tuples and * args after all?
What are environment variables?
About Go GET request