I tried to build coredns https://github.com/coredns/coredns/ by cloning the repo in my gopath and running make, which produced the following error
GO111MODULE=on go generate coredns.go
GO111MODULE=on CGO_ENABLED=0 go build -v -ldflags="-s -w -X github.com/coredns/coredns/coremain.GitCommit=f6eb2a4" -o coredns
../../../../pkg/mod/google.golang.org/grpc@v1.19.0/internal/channelz/types_linux.go:26:2:
../../../../pkg/mod/golang.org/x/sys@v0.0.0-20190215142949-d0b11bdaac8a/unix/affinity_linux.go:1:1: expected 'package', found 'EOF'
Makefile:17: recipe for target 'coredns' failed
make: *** [coredns] Error 1
I ran go mod tidy
and it fixed the error due x/sys
but after that another error appeared
# github.com/miekg/dns
Dev/Projects/golang/gopath/pkg/mod/github.com/miekg/dns@v1.1.6/scan.go:436:29: string not terminated
Dev/Projects/golang/gopath/pkg/mod/github.com/miekg/dns@v1.1.6/scan.go:436:44: syntax error: unexpected EOF, expecting comma or )
when I tried go get for this package I got the same error, I dont have this package in my gopath neither do I have it in my cache directory.
whats seems to be the problem here?