跳至主要內容

go基础教程

Moments小于 1 分钟

go基础教程


go国内镜像

在命令行里修改

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct

MAC或Linux

export GO111MODULE=on
export GOPROXY=https://goproxy.cn
echo "export GO111MODULE=on" >> ~/.profile
echo "export GOPROXY=https://goproxy.cn" >> ~/.profile
source ~/.profile

Windows

在PowerShell里执行。或者可以使用环境变量处理。

$env:GO111MODULE = "on"
$env:GOPROXY = "https://goproxy.cn"

gcc

https://sourceforge.net/projects/mingw-w64/files/mingw-w64/open in new window

https://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win64/Personal Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7zopen in new window

在windows中将目录C:\mingw64\bin添加环境变量。

环境变量

GO111MODULE = "on"
GOPROXY = "https://goproxy.cn"
Path
C:\mingw64\bin
C:\Program Files\Go\bin

上次编辑于:
贡献者: Moments