Home  >  Article  >  Backend Development  >  Can't see go.sum after initializing the project backend

Can't see go.sum after initializing the project backend

王林
王林forward
2024-02-09 18:30:181127browse

初始化项目后端后看不到 go.sum

php Editor Zimo may encounter a problem after initializing the project backend, that is, he cannot see the go.sum file. The go.sum file is the dependency management file in the Go language project, which records the various modules and their version information that the project depends on. Under normal circumstances, the go.sum file will be automatically generated after initializing the project, but sometimes it will not be displayed, which brings certain troubles to subsequent development and deployment. So, how should we solve this problem? Let’s introduce the solution in detail below.

Question content

I am trying to make a simple chat application using golang to understand the application better. The tutorial I followed requires initializing go.sum. After running the following command I only see go.mod

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

How do I try to resolve this issue?

Thank you in advance!

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

Workaround

The tutorial content you mentioned is a bit outdated. In current Go, go.sum is managed by the go mod tidy command.

The above is the detailed content of Can't see go.sum after initializing the project backend. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete