2

When I run go mod tidy in the root of my project I get this message.

go-dispatch imports
        net/http imports
        golang_org/x/net/http/httpguts: malformed module path "golang_org/x/net/http/httpguts": missing dot in first path element
go-dispatch imports
        net/http imports
        golang_org/x/net/http/httpproxy: malformed module path "golang_org/x/net/http/httpproxy": missing dot in first path element
go-dispatch imports
        net/http imports
        golang_org/x/net/http2/hpack: malformed module path "golang_org/x/net/http2/hpack": missing dot in first path element
go-dispatch imports
        net/http imports
        golang_org/x/net/idna: malformed module path "golang_org/x/net/idna": missing dot in first path element
go-dispatch imports
        net/http imports
        crypto/tls imports
        golang_org/x/crypto/chacha20poly1305: malformed module path "golang_org/x/crypto/chacha20poly1305": missing dot in first path element
go-dispatch imports
        net/http imports
        crypto/tls imports
        golang_org/x/crypto/curve25519: malformed module path "golang_org/x/crypto/curve25519": missing dot in first path element
go-dispatch imports
        net/http imports
        net imports
        golang_org/x/net/dns/dnsmessage: malformed module path "golang_org/x/net/dns/dnsmessage": missing dot in first path element
go-dispatch imports
        net/http imports
        net imports
        golang_org/x/net/lif: malformed module path "golang_org/x/net/lif": missing dot in first path element
go-dispatch imports
        net/http imports
        net imports
        golang_org/x/net/route: malformed module path "golang_org/x/net/route": missing dot in first path element
go-dispatch imports
        github.com/jinzhu/gorm/dialects/postgres imports
        github.com/lib/pq imports
        crypto/x509 imports
        golang_org/x/crypto/cryptobyte: malformed module path "golang_org/x/crypto/cryptobyte": missing dot in first path element
go-dispatch imports
        github.com/jinzhu/gorm/dialects/postgres imports
        github.com/lib/pq imports
        crypto/x509 imports
        golang_org/x/crypto/cryptobyte/asn1: malformed module path "golang_org/x/crypto/cryptobyte/asn1": missing dot in first path element
go-dispatch imports
        net/http imports
        net tested by
        net.test imports
        golang_org/x/net/nettest: malformed module path "golang_org/x/net/nettest": missing dot in first path element

I have tried everything from installing different versions of golang (1.11 - 1.13) and removed each as well. I have no idea what this issue means, but it seems to be a problem in the net/http package.

go env output:

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/thakidd/.cache/go-build"
GOENV="/home/thakidd/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY="xxx"
GONOSUMDB="xxx"
GOOS="linux"
GOPATH="/home/thakidd/go"
GOPRIVATE="xxx"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/thakidd/workspace/go-dispatch/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build783029481=/tmp/go-build -gno-record-gcc-switches"

I've also tried changing my GOROOT but that's set correctly as far as I can tell. I'm at a total loss as this is happening across several different projects. All have the same errors.

Bill.Caffery
  • 465
  • 1
  • 5
  • 21
  • How did you install Go? – Charlie Tumahai Dec 16 '19 at 05:22
  • 3
    Install Go with the official installer from golang.org. The brew installer is broken. –  Dec 16 '19 at 05:23
  • What's the output of `where go`? – leaf bebop Dec 16 '19 at 05:27
  • Can you check https://stackoverflow.com/q/59095179 and https://stackoverflow.com/q/58473656 ? – Oleg Butuzov Dec 16 '19 at 06:02
  • I installed go via apt on ubuntu | Not brew | `$which go` = `/usr/bin/go` | I checked both of those before posting this question. The solution to both of those was to edit the enclosing app's structure or go.mod config. Neither are an option for built in packages like `net/http` – Bill.Caffery Dec 27 '19 at 00:13
  • @iLoveReflection Thanks for the lead. After some digging i installed direct from tarball. Problem solved. snap and apt packages are no good right now. – Bill.Caffery Dec 27 '19 at 01:08

1 Answers1

0

@iLoveReflection Thanks for the lead.

After some digging I installed direct from tarball. Problem solved. snap and apt packages are no good right now it seems.

Bill.Caffery
  • 465
  • 1
  • 5
  • 21