banner
keney

keney

remain optimistic
twitter

go-window environment installation (recommended)

Download the installation package

https://go.dev/learn/

Preparation#

Download the compiler

Compiler download:

https://www.jetbrains.com.cn/go

Paid

vscode, vim

Free

1. Go Installation#

I will directly download the Go language installation package here,

Unzip to D:\software\go directory:

2. Environment Configuration#

The approximate location for configuring Windows system environment variables: Advanced system settings > Environment Variables > System Variables

Variable name: GO_HOME1231

Click Path:

Add

Create Go third-party packages:

The meanings of the three directories under GOPATH are as follows:

The src directory mainly stores Go source files

The pkg directory stores compiled library files, mainly *.a files;

The bin directory mainly stores executable files

Click Path:

Add

GOPATH is the path for storing Go tool dependencies, you can set it yourself; I placed it in a directory created by GoWorks, which needs to include src, pkg, and bin three directories. Set to

Check if the installation was successful#

Check the version:

Check the environment variables:

Configure Go Proxy#

Add proxy in environment variables

GOPROXY

Purpose: Downloading foreign packages is relatively slow, using domestic proxies is faster

Common Go Proxies#

Other Operating Systems#

Configure Go proxy under mac/linux

Reference: https://goproxy.io/zh/

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.