GO-Gin

Gin中文网:https://gin-gonic.com/zh-cn/docs/
1、安装Gin过程中遇到的问题
基本配置如下:
设置了
GOPROXY
https://mirrors.aliyun.com/goproxy/
在这里插入图片描述
在这里插入图片描述
问题描述:
在命令行中执行

 go get -u github.com/gin-gonic/gin

在命令行中未出现异常,
但Goland中出现报错如下:
网络服务异常

go: loading module retractions for github.com/bytedance/sonic@v1.11.6: Get "https://mirrors.aliyun.com/goproxy/github.com/bytedance/sonic/@v/list": Internal Server Error
go: loading module retractions for github.com/bytedance/sonic/loader@v0.1.1: Get "https://mirrors.aliyun.com/goproxy/github.com/bytedance/sonic/loader/@v/list": Internal Server Error
go: loading module retractions for github.com/cloudwego/base64x@v0.1.4: Get "https://mirrors.aliyun.com/goproxy/github.com/cloudwego/base64x/@v/list": Internal Server Error
go: loading module retractions for github.com/cloudwego/iasm@v0.2.0: Get "https://mirrors.aliyun.com/goproxy/github.com/cloudwego/iasm/@v/list": Internal Server Error
go: loading module retractions for github.com/davecgh/go-spew@v1.1.1: Get "https://mirrors.aliyun.com/goproxy/github.com/davecgh/go-spew/@v/list": Internal Server Error
go: loading module retractions for github.com/gabriel-vasile/mimetype@v1.4.3: Get "https://mirrors.aliyun.com/goproxy/github.com/gabriel-vasile/mimetype/@v/list": Internal Server Error
go: loading module retractions for github.com/gin-contrib/sse@v0.1.0: Get "https://mirrors.aliyun.com/goproxy/github.com/gin-contrib/sse/@v/list": Internal Server Error
go: loading module retractions for github.com/gin-gonic/gin@v1.10.0: Get "https://mirrors.aliyun.com/goproxy/github.com/gin-gonic/gin/@v/list": Internal Server Error
go: loading module retractions for github.com/go-playground/assert/v2@v2.2.0: Get "https://mirrors.aliyun.com/goproxy/github.com/go-playground/assert/v2/@v/list": Internal Server Error
go: loading module retractions for github.com/go-playground/locales@v0.14.1: Get "https://mirrors.aliyun.com/goproxy/github.com/go-playground/locales/@v/list": Internal Server Error
go: loading module retractions for github.com/go-playground/universal-translator@v0.18.1: Get "https://mirrors.aliyun.com/goproxy/github.com/go-playground/universal-translator/@v/list": Internal Server Error
go: loading module retractions for github.com/go-playground/validator/v10@v10.20.0: Get "https://mirrors.aliyun.com/goproxy/github.com/go-playground/validator/v10/@v/list": Internal Server Error
go: loading module retractions for github.com/goccy/go-json@v0.10.2: Get "https://mirrors.aliyun.com/goproxy/github.com/goccy/go-json/@v/list": Internal Server Error
go: loading module retractions for github.com/golang/protobuf@v1.5.0: Get "https://mirrors.aliyun.com/goproxy/github.com/golang/protobuf/@v/list": Internal Server Error
go: loading module retractions for github.com/google/go-cmp@v0.5.5: Get "https://mirrors.aliyun.com/goproxy/github.com/google/go-cmp/@v/list": Internal Server Error
go: loading module retractions for github.com/google/gofuzz@v1.0.0: Get "https://mirrors.aliyun.com/goproxy/github.com/google/gofuzz/@v/list": Internal Server Error
go: loading module retractions for github.com/json-iterator/go@v1.1.12: Get "https://mirrors.aliyun.com/goproxy/github.com/json-iterator/go/@v/list": Internal Server Error
go: loading module retractions for github.com/klauspost/cpuid/v2@v2.2.7: Get "https://mirrors.aliyun.com/goproxy/github.com/klauspost/cpuid/v2/@v/list": Internal Server Error
go: loading module retractions for github.com/knz/go-libedit@v1.10.1: Get "https://mirrors.aliyun.com/goproxy/github.com/knz/go-libedit/@v/list": Internal Server Error
go: loading module retractions for github.com/leodido/go-urn@v1.4.0: Get "https://mirrors.aliyun.com/goproxy/github.com/leodido/go-urn/@v/list": Internal Server Error
go: loading module retractions for github.com/mattn/go-isatty@v0.0.20: Get "https://mirrors.aliyun.com/goproxy/github.com/mattn/go-isatty/@v/list": Internal Server Error
go: loading module retractions for github.com/modern-go/concurrent@v0.0.0-20180306012644-bacd9c7ef1dd: Get "https://mirrors.aliyun.com/goproxy/github.com/modern-go/concurrent/@v/list": Internal Server Error
go: loading module retractions for github.com/modern-go/reflect2@v1.0.2: Get "https://mirrors.aliyun.com/goproxy/github.com/modern-go/reflect2/@v/list": Internal Server Error
go: loading module retractions for github.com/pelletier/go-toml/v2@v2.2.2: Get "https://mirrors.aliyun.com/goproxy/github.com/pelletier/go-toml/v2/@v/list": Internal Server Error
go: loading module retractions for github.com/pmezard/go-difflib@v1.0.0: Get "https://mirrors.aliyun.com/goproxy/github.com/pmezard/go-difflib/@v/list": Internal Server Error
go: loading module retractions for github.com/stretchr/objx@v0.5.2: Get "https://mirrors.aliyun.com/goproxy/github.com/stretchr/objx/@v/list": Internal Server Error
go: loading module retractions for github.com/stretchr/testify@v1.9.0: Get "https://mirrors.aliyun.com/goproxy/github.com/stretchr/testify/@v/list": Internal Server Error
go: loading module retractions for github.com/twitchyliquid64/golang-asm@v0.15.1: Get "https://mirrors.aliyun.com/goproxy/github.com/twitchyliquid64/golang-asm/@v/list": Internal Server Error
go: loading module retractions for github.com/ugorji/go/codec@v1.2.12: Get "https://mirrors.aliyun.com/goproxy/github.com/ugorji/go/codec/@v/list": Internal Server Error
go: loading module retractions for golang.org/x/arch@v0.8.0: Get "https://mirrors.aliyun.com/goproxy/golang.org/x/arch/@v/list": Internal Server Error
go: loading module retractions for golang.org/x/crypto@v0.23.0: Get "https://mirrors.aliyun.com/goproxy/golang.org/x/crypto/@v/list": Internal Server Error
go: loading module retractions for golang.org/x/mod@v0.8.0: Get "https://mirrors.aliyun.com/goproxy/golang.org/x/mod/@v/list": Internal Server Error
go: loading module retractions for golang.org/x/net@v0.25.0: Get "https://mirrors.aliyun.com/goproxy/golang.org/x/net/@v/list": Internal Server Error
go: loading module retractions for golang.org/x/sys@v0.20.0: Get "https://mirrors.aliyun.com/goproxy/golang.org/x/sys/@v/list": Internal Server Error
go: loading module retractions for golang.org/x/term@v0.20.0: Get "https://mirrors.aliyun.com/goproxy/golang.org/x/term/@v/list": Internal Server Error
go: loading module retractions for golang.org/x/text@v0.15.0: Get "https://mirrors.aliyun.com/goproxy/golang.org/x/text/@v/list": Internal Server Error
go: loading module retractions for golang.org/x/tools@v0.6.0: Get "https://mirrors.aliyun.com/goproxy/golang.org/x/tools/@v/list": Internal Server Error
go: loading module retractions for golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543: Get "https://mirrors.aliyun.com/goproxy/golang.org/x/xerrors/@v/list": Internal Server Error
go: loading module retractions for google.golang.org/protobuf@v1.34.1: Get "https://mirrors.aliyun.com/goproxy/google.golang.org/protobuf/@v/list": Internal Server Error
go: loading module retractions for gopkg.in/check.v1@v0.0.0-20161208181325-20d25e280405: Get "https://mirrors.aliyun.com/goproxy/gopkg.in/check.v1/@v/list": Internal Server Error
go: loading module retractions for gopkg.in/yaml.v3@v3.0.1: Get "https://mirrors.aliyun.com/goproxy/gopkg.in/yaml.v3/@v/list": Internal Server Error
go: loading module retractions for nullprogram.com/x/optparse@v1.0.0: Get "https://mirrors.aliyun.com/goproxy/nullprogram.com/x/optparse/@v/list": Internal Server Error
go: loading module retractions for rsc.io/pdf@v0.1.1: Get "https://mirrors.aliyun.com/goproxy/rsc.io/pdf/@v/list": Internal Server Error

go.mod中内容如下:
依赖不可用状态
在这里插入图片描述
解决:
命令行中未出现异常,说明 本机与配置的阿里云代理库之间连接正常
但Goland中出现网络异常,依赖加载失败。
在这里插入图片描述
配置Goland的网络连接后,重启一下
在这里插入图片描述
问题解决,依赖完成下载
在这里插入图片描述


另外,如下图,如果require中爆红
在这里插入图片描述
可排查是否配置GPROXY环境!
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值