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.
Methods containing type literals can't be mocked in source mode #8
Closed
Description
If an interface has a method containing a literal struct type, then mockgen isn't able to generate a mock when using source mode.
E.g. interfaces.go
:
type Foo interface {
Baz(struct{})
}
type Bar interface {
Baz() struct{}
}
$ mockgen -source=interfaces.go
gives the following error: 2015/08/18 15:02:43 Loading input failed: interfaces.go:6:5: failed parsing arguments: don't know how to parse type *ast.StructType
.
The mocks can be generated successfully when using mockgen in reflect mode.
Metadata
Metadata
Assignees
Labels
No labels