1

I'm running go version 1.10.4 on linux. Specifically, I'm trying to install the YouCompleteMe plugin for VIM and get an error on gopls.

I have looked at similar stackoverflow & github issues with go.

https://github.com/golang/go/issues/36442 How to solve vs code - gopls command is not available

$ go version
go version go1.10.4 linux/amd64

When running the standard command below, this is the response I get:

$ go install golang.org/x/tools/gopls@latest
can't load package: package golang.org/x/tools/gopls@latest: cannot find package "golang.org/x/tools/gopls@latest" in any of:
    /usr/lib/go-1.10/src/golang.org/x/tools/gopls@latest (from $GOROOT)
    /home/user/go/src/golang.org/x/tools/gopls@latest (from $GOPATH)

When running the suggested command here is the output:

$ cd /tmp/

$ GO111MODULE=on go get golang.org/x/tools/gopls

# golang.org/x/mod/module
/home/USER/go/src/golang.org/x/mod/module/module.go:147:5: undefined: errors.As
# golang.org/x/tools/internal/memoize
/home/USER/go/src/golang.org/x/tools/internal/memoize/memoize.go:180:3: undefined: trace.WithRegion
# golang.org/x/tools/gopls/internal/span
/home/USER/go/src/golang.org/x/tools/gopls/internal/span/token.go:213:11: tf.LineStart undefined (type *token.File has no field or method LineStart)
# golang.org/x/tools/internal/typeparams
/home/USER/go/src/golang.org/x/tools/internal/typeparams/normalize.go:164:17: u.EmbeddedType undefined (type *types.Interface has no field or method EmbeddedType)
# github.com/google/go-cmp/cmp
/home/USER/go/src/github.com/google/go-cmp/cmp/report_compare.go:249:29: r.Value.ValueX.IsZero undefined (type reflect.Value has no field or method IsZero)
/home/USER/go/src/github.com/google/go-cmp/cmp/report_compare.go:249:56: r.Value.ValueY.IsZero undefined (type reflect.Value has no field or method IsZero)
/home/USER/go/src/github.com/google/go-cmp/cmp/report_compare.go:251:29: r.Value.ValueX.IsZero undefined (type reflect.Value has no field or method IsZero)
/home/USER/go/src/github.com/google/go-cmp/cmp/report_compare.go:253:29: r.Value.ValueY.IsZero undefined (type reflect.Value has no field or method IsZero)
/home/USER/go/src/github.com/google/go-cmp/cmp/report_reflect.go:194:9: vv.IsZero undefined (type reflect.Value has no field or method IsZero)
# golang.org/x/tools/internal/jsonrpc2_v2
/home/USER/go/src/golang.org/x/tools/internal/jsonrpc2_v2/net.go:19:18: undefined: net.ListenConfig
# golang.org/x/tools/internal/jsonrpc2
/home/USER/go/src/golang.org/x/tools/internal/jsonrpc2/messages.go:171:5: undefined: errors.As
/home/USER/go/src/golang.org/x/tools/internal/jsonrpc2/serve.go:153:5: undefined: errors.Is

0 Answers0