go编译出错,添加国内代理go: github.com/gomodule/redigo@v1.8.8: Get
[root@localhost todis_exporter-todis-exporter]# git clone https://github.com/topling/todis_exporter.git
Cloning into 'todis_exporter'...
remote: Enumerating objects: 3252, done.
remote: Counting objects: 100% (457/457), done.
remote: Compressing objects: 100% (276/276), done.
remote: Total 3252 (delta 260), reused 305 (delta 171), pack-reused 2795
Receiving objects: 100% (3252/3252), 7.46 MiB | 119.00 KiB/s, done.
Resolving deltas: 100% (1666/1666), done.
[root@localhost todis_exporter-todis-exporte]# cd rtodis_exporter
[root@localhost todis_exporter]# go build .
go: github.com/gomodule/redigo@v1.8.8: Get "https://proxy.golang.org/github.com/gomodule/redigo/@v/v1.8.8.mod": dial tcp 142.251.43.17:443: connect: connection refused
go: downloading github.com/prometheus/client_golang v1.12.1
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading github.com/gomodule/redigo v1.8.8
go: downloading github.com/mna/redisc v1.3.2
go: github.com/gomodule/redigo@v1.8.8: Get "https://proxy.golang.org/github.com/gomodule/redigo/@v/v1.8.8.mod": dial tcp 142.251.43.17:443: connect: connection refused
[root@localhost todis_exporter]# go env -w GOPROXY=https://goproxy.cn,direct ---添加国内代理
[root@localhost todis_exporter]# go build .
go: downloading github.com/prometheus/client_golang v1.12.1
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/common v0.32.1
go: downloading github.com/prometheus/procfs v0.7.3
go: downloading google.golang.org/protobuf v1.26.0
go: downloading golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
go: downloading github.com/gomodule/redigo v1.8.8
go: downloading github.com/mna/redisc v1.3.2
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
Cloning into 'todis_exporter'...
remote: Enumerating objects: 3252, done.
remote: Counting objects: 100% (457/457), done.
remote: Compressing objects: 100% (276/276), done.
remote: Total 3252 (delta 260), reused 305 (delta 171), pack-reused 2795
Receiving objects: 100% (3252/3252), 7.46 MiB | 119.00 KiB/s, done.
Resolving deltas: 100% (1666/1666), done.
[root@localhost todis_exporter-todis-exporte]# cd rtodis_exporter
[root@localhost todis_exporter]# go build .
go: github.com/gomodule/redigo@v1.8.8: Get "https://proxy.golang.org/github.com/gomodule/redigo/@v/v1.8.8.mod": dial tcp 142.251.43.17:443: connect: connection refused
go: downloading github.com/prometheus/client_golang v1.12.1
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading github.com/gomodule/redigo v1.8.8
go: downloading github.com/mna/redisc v1.3.2
go: github.com/gomodule/redigo@v1.8.8: Get "https://proxy.golang.org/github.com/gomodule/redigo/@v/v1.8.8.mod": dial tcp 142.251.43.17:443: connect: connection refused
[root@localhost todis_exporter]# go env -w GOPROXY=https://goproxy.cn,direct ---添加国内代理
[root@localhost todis_exporter]# go build .
go: downloading github.com/prometheus/client_golang v1.12.1
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/common v0.32.1
go: downloading github.com/prometheus/procfs v0.7.3
go: downloading google.golang.org/protobuf v1.26.0
go: downloading golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
go: downloading github.com/gomodule/redigo v1.8.8
go: downloading github.com/mna/redisc v1.3.2
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
------道不行,乘桴浮于海!------
------欲讷于言,而敏于行!-------