原始go.mod文件git
module xxx go 1.14
go mod init workorder go mod init: go.mod already exists go mod tidy go: finding module for package github.com/greyh4t/zhttp go: finding module for package github.com/tidwall/gjson go: finding module for package github.com/deckarep/golang-set workorder imports github.com/deckarep/golang-set: module github.com/deckarep/golang-set: Get "https://proxy.golang.org/github.com/deckarep/golang-set/@v/list": dial tcp 34.64.4.81:443: i/o timeout workorder imports github.com/greyh4t/zhttp: module github.com/greyh4t/zhttp: Get "https://proxy.golang.org/github.com/greyh4t/zhttp/@v/list": dial tcp 34.64.4.81:443: i/o timeout workorder imports github.com/tidwall/gjson: module github.com/tidwall/gjson: Get "https://proxy.golang.org/github.com/tidwall/gjson/@v/list": dial tcp 34.64.4.81:443: i/o timeout
➜ ~ vim ./.zshrc export GO111MODULE=on export GOPROXY=https://goproxy.io ➜ ~ . ./.zshrc
而後在運行一次:go mod tidygithub
加載後的go.mod文件golang
module xxx go 1.14 require ( github.com/deckarep/golang-set v1.7.1 github.com/greyh4t/zhttp v0.0.0-20200602035456-2186ce915b30 github.com/stretchr/testify v1.6.1 // indirect github.com/tidwall/gjson v1.6.0 )
https://blog.csdn.net/dgatiger/article/details/105205190
https://blog.csdn.net/zzhongcy/article/details/97243826json