- 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
when trying to build a project with a dependency of gin, the project cannot be built in docker.
How to reproduce
docker pull golang:1.16
docket run -it golang:1.16 bash
git clone https://github.com/madneal/gshark
cd gshark/server
go env -w GO111MODULE=on \
&& go env -w GOPROXY=https://goproxy.cn,direct \
&& go env -w CGO_ENABLED=0 \
&& go env \
&& go mod tidy \
&& go build -o server .
Expectations
The project can be built without error
Actual result
root@c8d8e646c9b5:/go/gshark/server# go build
core/server_other.go:7:2: //go:build comment without // +build comment
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:23:2: //go:build comment without // +build comment
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/form_mapping.go:15:2: //go:build comment without // +build comment
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/form_mapping.go:16:2: //go:build comment without // +build comment
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:24:2: //go:build comment without // +build comment
Environment
- go version: 1.16
- gin version (or commit ref): 1.9.1
- operating system: docker
Comment From: madneal
this issue is fixed with go1.18