- With issues:
- Use the search tool before opening a new issue.
- Please provide source code and commit sha if you found a bug.
- Review existing issues and provide feedback or react to them.
Description
Error occured while building or running for go modules.
..\..\..\go\pkg\mod\github.com\gin-gonic\gin@v1.7.2\binding\yaml.go:12:2: missing go.sum entry for module providing package gopkg.in/yaml.v2; to add:
go mod download gopkg.in/yaml.v2
go mod tidy
is not working. And I tryed go get -u
to update modules but more errors occured.
How to reproduce
Even this can cause the error.
package main
import (
"github.com/gin-gonic/gin"
)
func main() {
g := gin.Default()
g.GET("/hello/:name", func(c *gin.Context) {
c.String(200, "Hello %s", c.Param("name"))
})
g.Run(":9000")
}
Expectations
$ curl http://localhost:8201/hello/world
Hello world
Actual result
$ curl -i http://localhost:8201/hello/world
<YOUR RESULT>
Environment
- go version:go1.16.2
- gin version (or commit ref):v1.7.2
- operating system:windows/amd64 win10
Comment From: Mmx233
I don't know what happend. But it recoverd suddenly.
Comment From: dengyunsheng250
yes,i have meet this problem also.
Comment From: dengyunsheng250
i found that if use go mod vendor
it may be normal