You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
Document why a user should choose the source or reflect mode.
Why the feature is needed
The README states:
mockgen has two modes of operation: source and reflect.
Source mode generates mock interfaces from a source file.
Reflect mode generates mock interfaces by building a program that uses reflection to understand interfaces.
The CLI help states:
mockgen has two modes of operation: source and reflect.
Source mode generates mock interfaces from a source file.
It is enabled by using the -source flag. Other flags that
may be useful in this mode are -imports and -aux_files.
Example:
mockgen -source=foo.go [other options]
Reflect mode generates mock interfaces by building a program
that uses reflection to understand interfaces. It is enabled
by passing two non-flag arguments: an import path, and a
comma-separated list of symbols.
Neither explains which mode a user should choose. Is one faster than the other? Is one more reliable? Are they the same? If so, why do both exist?
This is a follow up issue as requested in #36 (comment)
codeactual, tooolbox, bravoecho, tymonx, shashankram and 10 more