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

Description
Mockgen can't generate mocks for interfaces whose method param or return types are unnamed non-empty structs. For example:
Suppose I have a foo.go file whose package import path is foo:
package foo
type Client interface {
Get() struct{ x int }
}
Running source mode mockgen -source=foo/foo.go gives
failed parsing returns: foo/foo.go:4:8: can't handle non-empty unnamed struct types
Running reflect mode mockgen foo Client gives
Reflection: can't yet turn struct { x int } (struct) into a model.Type