Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env)?
go env GOOS=linux GOARCH=amd64
$ go env
What did you do?
I've tried to build my go app with modules in docker.
FROM golang:1.12.9 as builder
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o encashment
COPY --from=builder /app/encashment /encashment/
The problem was that my docker had no internet connection and go mod download couldn't load packages. I was very confused with an error message it returns. Suddenly, I don't know exactly what was wrong and how to reproduce this properly. But I did: