-
Writing mocks for each test is tedious, setup mockgen to create the necessary mocks (preferably using comments in the files), refactor the tests to use the generated mocks, and create a make target in…
-
### What version of `dep` are you using (`dep version`)?
0.3.1, and master (82b390843af758fd609059154481ddd2f83b1e5d), fetched using go get and built using golang 1.8-1 as shipped with Debian/stretch…
hillu updated
5 years ago
-
The mockgen need to be installed instead of dowloaded and is necessary to have sudo permissions on default go installation.
`sudo go install github.com/golang/mock/mockgen`
I can do a pull reque…
-
I'm trying to generate a mock from a source.
```
$ cat x.go
package test
type X struct{}
type S interface {
F(X)
}
```
```
$ mockgen -source x.go
// Automatically generated by MockGen.…
-
We would like to "vendorize" `mockgen` in our project, in order to freeze the version we are using and prevent unexpected breakages. We already do this with `gomock` for the same reason. We use [`gove…
-
go version
```
songyanh-C02R52QLG8WM:multipass songyanh$ go version
go version go1.10 darwin/amd64
```
go env
```
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/songyanhou/Library/Caches/go-build"…
-
https://github.com/natalymr/gcm/blob/master/naive_naive/naive.py -- скрипт для подсчета результатов
-
When running against an empty interface, mockgen is writing out Go files that import the reflect library but don't actually use it causing an unexpected error during test execution:
```
imported a…
-
Here are my test files (2 packages):
*github.com/anyuser/pkg1/pkg1.go:*
```go
package pkg1
type I interface {
E
}
type E interface {
M()
}
```
*github.com/anyuser/pkg2/pkg2.go:*
…
-
The latest release of `v1.0.1` broke our CI builds. It seems that Mockgen no longer honors the vendor folder, and instead only looks in your GOROOT and GOPATH.
Usage (`go generate` command at the t…