go run main.go报错
..\..\pkg\mod\github.com\labstack\echo\v4@v4.9.0\middleware\jwt.go:9:2: missing go.sum entry for module providing package github.com/golang-jwt/jwt (imported by github.com/labstack/echo/v4/middleware); to add:
go get github.com/labstack/echo/v4/middleware@v4.9.0
..\..\pkg\mod\github.com\labstack\echo\v4@v4.9.0\middleware\rate_limiter.go:9:2: missing go.sum entry for module providing package golang.org/x/time/rate (imported by github.com/labstack/echo/v4/middleware); to add:
go get github.com/labstack/echo/v4/middleware@v4.9.0
原因是第三方类库更新了而mod没有更新,需要执行mod更新同步。
执行下面命令解决:
go mod tidy
重新执行go run main.go即可(安装echo)