设置后Go环境变量保持不变

I start learning Go programming by watching online tutorials. I use Windows command prompt. However, after I typed set GOOS = darwin then used go env to print environment variables, GOOS was not set to GOOS=darwin but still GOOS=windows as default.


Here is what I got. Could someone tell me where I went wrong such that I cannot make change on GOOS?

C:\GoPath\src\palindrome>set GOOS = darwin

C:\GoPath\src\palindrome>go env
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows

"Any extra spaces around either the variable name or the string, will not be ignored, SET is not forgiving of extra spaces like many other scripting languages."

Change set GOOS = darwin to set GOOS=darwin - i.e., the same format you see in the output of go env.