1. go mod no required module provides package github.com/gin-gonic/gin; to add it:
执行完:go mod edit -require github.com/gin-gonic/gin@1.7.4 报上面的错误
一定要执行: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
查看这两项值:
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)