sgreben/testing-with-gomock

Tutorial requires sgreben doer package

Opened this issue · 0 comments

bath commented

Greetings,

Following tutorial on: https://blog.codecentric.de/en/2017/08/gomock-tutorial/#basic-usage

When using:
mockgen -destination=mocks/mock_doer.go -package=mocks github.com/sgreben/testing-with-gomock/doer Doer

I receive:
prog.go:14:2: cannot find package "github.com/sgreben/testing-with-gomock/doer" in any of: /usr/local/go/src/github.com/sgreben/testing-with-gomock/doer (from $GOROOT) /Users/millerbath/go/src/github.com/sgreben/testing-with-gomock/doer (from $GOPATH) prog.go:14:2: cannot find package "github.com/sgreben/testing-with-gomock/doer" in any of: /usr/local/go/src/github.com/sgreben/testing-with-gomock/doer (from $GOROOT) /Users/millerbath/go/src/github.com/sgreben/testing-with-gomock/doer (from $GOPATH) 2020/06/14 16:37:51 Loading input failed: exit status 1

This is because I needed to run:
go get github.com/sgreben/testing-with-gomock/doer

As I was following along with the tutorial by cloning this repository, I ran into the issue above. I am new to Go, so this was confusing for me. Thought I'd let you(or others) know in case this has been a problem.