下载并安装 gin的命令:go get -u github.com/gin-gonic/gin 执行后报:
go: module github.com/gin-gonic/gin: Get "https://proxy.golang.org/github.com/gin-gonic/gin/@v/list": dial tcp 142.251.43.17:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

错误。

解决的办法是:

使用国内代理

go env -w GO111MODULE=on

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

执行成功