新人请教:go1.22降级到go1.15.15版本后的gin框架运行不了

wuditiequan · · 962 次点击 · 开始浏览    置顶
这是一个创建于 的主题,其中的信息可能已经有所发展或是发生改变。

C:\Users\Stere\go\pkg\mod\golang.org\x\net@v0.21.0\html\node.go:8:2: found packages atom (atom.go) and main (gen.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\net@v0.21.0\html\atom C:\Users\Stere\go\pkg\mod\github.com\xuri\excelize\v2@v2.8.1\pivotTable.go:24:2: found packages cases (cases.go) and main (gen.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\cases C:\Users\Stere\go\pkg\mod\golang.org\x\net@v0.21.0\html\charset\charset.go:21:2: found packages charmap (charmap.go) and main (maketables.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\charmap C:\Users\Stere\go\pkg\mod\golang.org\x\net@v0.21.0\html\charset\charset.go:22:2: import "golang.org/x/text/encoding/htmlindex" is a program, not an importable package C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\encoding.go:19:2: import "golang.org/x/text/encoding/internal/identifier" is a program, not an importable package C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\htmlindex\map.go:11:2: found packages japanese (all.go) and main (maketables.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\japanese C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\htmlindex\map.go:12:2: found packages korean (all_test.go) and main (maketables.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\korean C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\htmlindex\map.go:13:2: found packages simplifiedchinese (all.go) and main (maketables.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\simplifiedchinese C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\htmlindex\map.go:14:2: found packages traditionalchinese (all_test.go) and main (maketables.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\encoding\traditionalchinese C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\message\message.go:12:2: found packages plural (common.go) and main (gen.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\feature\plural package command-line-arguments imports github.com/gin-gonic/gin imports github.com/gin-gonic/gin/binding imports github.com/go-playground/validator/v10 imports golang.org/x/text/language imports golang.org/x/text/internal/gen imports golang.org/x/text/unicode/cldr imports golang.org/x/text/internal/gen: import cycle not allowed C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\language\coverage.go:11:2: found packages language (common.go) and main (gen.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\internal\language C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\language\language.go:16:2: found packages compact (compact.go) and main (gen.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\internal\language\compact C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\feature\plural\message.go:14:2: found packages number (common.go) and main (gen.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\internal\number C:\Users\Stere\go\pkg\mod\github.com\go-playground\validator\v10@v10.14.0\baked_in.go:23:2: found packages language (coverage.go) and main (gen.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\language C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\internal\gen\gen.go:38:2: found packages cldr (base.go) and main (makexml.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\unicode\cldr C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\cases\gen.go:27:2: found packages norm (composition.go) and main (maketables.go) in C:\Users\Stere\go\pkg\mod\golang.org\x\text@v0.14.0\unicode\norm C:\Users\Stere\go\pkg\mod\github.com\go-playground\validator\v10@v10.14.0\baked_in.go:10:2: package io/fs is not in GOROOT (C:\Program Files\Go\src\io\fs) Compilation finished with exit code 1 出现了各种包的问题,我怀疑是go1.15版本不支持gin框架最新的版本,所以我对gin框架降级到1.7版本,好像还是不行。降级后要怎么做呀,真的崩溃了。 事情是这样的~领导让我做一个小项目,自己在win10上使用go1.22版本开发完成后准备打包到win7上运行,然后发现跑不起来,就找资料,就知道了go1.22不支持win7,降级到1.15,然后就发现了好多问题,我要怎么做呀各位大佬。。

有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

962 次点击  
加入收藏 微博
4 回复  |  直到 2024-04-10 19:39:28
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传