Home >Backend Development >Golang >What is the difference between export and 'go env -w'
What exactly does "go env -w
" do? I've skimmed this long proposal but haven't figured out the gist of it yet. Right now,
export
? By the way, what I'm asking about is "go env -w GOPRIVATE". What difference would it make if I did it either way.
Rungo help environment
:
Environment variables take precedence. Therefore, if GOPRIVATE
is set on your system, it will be used. If not, or if you unset it, the value you set with go env -w GOPRIVATE=xy
will be used.
If you run go help env
:
Therefore, you can cancel manually changed GOPRIVATE
defaults by running go env -u GOPRIVATE
.
The above is the detailed content of What is the difference between export and 'go env -w'. For more information, please follow other related articles on the PHP Chinese website!