Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

unable to install mockgen following the instructions in README #308

@dmitris

Description

@dmitris

I'm unable to install mockgen following the instructions in https://github.com/golang/mock#installation:

$ go get -v github.com/golang/mock/gomock
github.com/golang/mock (download)
created GOPATH=/home/dmitris/go; see 'go help gopath'
github.com/golang/mock/gomock
$ go install -v github.com/golang/mock/mockgen
go/src/github.com/golang/mock/mockgen/parse.go:34:2: cannot find package "golang.org/x/tools/go/packages" in any of:
	/usr/local/go/src/golang.org/x/tools/go/packages (from $GOROOT)
	/home/dmitris/go/src/golang.org/x/tools/go/packages (from $GOPATH)

To make go install work, I had to also run:
go get -v golang.org/x/tools/go/packages. Alternatively, the following command works:
go get -v -u github.com/golang/mock/mockgen - maybe we could use it instead of the current pair of go get and go install?

go version output: go version go1.12.6 linux/amd64

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions