初始化项目后无法看到 go.sum 文件。

huangapple go评论85阅读模式
英文:

Cannot see go.sum after initializing backend of project

问题

我正在尝试使用Golang制作一个简单的聊天应用程序,以便更好地理解应用程序。我正在按照教程的要求初始化go.sum。运行以下命令后,我只看到了go.mod文件。

go install golang.org/x/tools/gopls@latest
go mod init github.com/TutorialEdge/realtime-chat-go-react

我该如何解决这个问题呢?

谢谢!我已经查看了可能的版本错误,但是我无法找到解决方法。我仍然只能看到go.mod文件。

英文:

I am trying to make a simple Chat app using Golang in order to better understand the application. The tutorial I am following asks to initialize go.sum. After running the following commands, I only see go.mod

go install golang.org/x/tools/gopls@latest
go mod init github.com/TutorialEdge/realtime-chat-go-react

How can I try to resolve this issue?

Thank you in advance!

I looked into possible version errors, but I can't really find a fix. I still can only see go.mod

答案1

得分: 1

你所提到的教程内容有些过时。在当前的Go版本中,go.sum 文件是通过 go mod tidy 命令进行管理的。

英文:

The tutorial you are referring to is a bit dated in content. In current Go, go.sum is managed by the go mod tidy command.

huangapple
  • 本文由 发表于 2022年12月31日 09:41:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/74967059.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定