- Security with Go
- John Daniel Leon
- 125字
- 2021-06-30 19:06:44
Installing a program for use
Installing a program is similar to building one but, instead of running go build, you run go install. You can run it inside a directory, pass it an absolute directory path, and pass it a directory path relative to the $GOPATH environment variable or on a file directly. Once a program has been installed, it goes into your $GOBIN, which you should have already set. You should have already added $GOBIN to your $PATH as well so that you can run the installed programs directly from your command line no matter what directory you are currently in. Installing is totally optional, but it is convenient for certain programs, especially for the ones you want to save or use frequently.