go mod 使用报错问题

go mod 使用报错问题,第1张

1. go mod no required module provides package github.com/gin-gonic/gin; to add it:

执行完:go mod edit -require github.com/gin-gonic/[email protected] 报上面的错误

一定要执行:go mod tidy

如果还报错:

go: errors parsing go.mod:
D:\Go_Project\myGoProjectNew\go.mod:5: require github.com/gin-gonic/gin: version "1.7.4" invalid: Get "https://proxy.golang.org/github.com/gin-gonic/gin/@v/1.7.4.info": dial tcp 172.21
7.163.49: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 hos
t has failed to respond.
 

执行 go env 

查看这两项值:

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/989722.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存