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
"""Calls [mockgen](https://github.com/golang/mock) to generates a Go file containing mocks from the given library.
179
179
180
-
If `source` is given, the mocks are generated in source mode; otherwise in reflective mode.
180
+
If `source` is given, the mocks are generated in source mode; otherwise in archive mode.
181
181
182
182
Args:
183
183
name: the target name.
184
184
out: the output Go file name.
185
-
library: the Go library to look into for the interfaces (reflective mode) or source (source mode). If running in source mode, you can specify source_importpath instead of this parameter.
185
+
library: the Go library to look into for the interfaces (archive mode) or source (source mode). If running in source mode, you can specify source_importpath instead of this parameter.
186
186
source_importpath: the importpath for the source file. Alternative to passing library, which can lead to circular dependencies between mock and library targets. Only valid for source mode.
187
187
source: a Go file in the given `library`. If this is given, `gomock` will call mockgen in source mode to mock all interfaces in the file.
188
-
interfaces: a list of interfaces in the given `library` to be mocked in reflective mode.
188
+
interfaces: a list of interfaces in the given `library` to be mocked in archive mode.
189
189
package: the name of the package the generated mocks should be in. If not specified, uses mockgen's default. See [mockgen's -package](https://github.com/golang/mock#flags) for more information.
190
190
self_package: the full package import path for the generated code. The purpose of this flag is to prevent import cycles in the generated code by trying to include its own package. See [mockgen's -self_package](https://github.com/golang/mock#flags) for more information.
191
191
aux_files: a map from source files to their package path. This only needed when `source` is provided. See [mockgen's -aux_files](https://github.com/golang/mock#flags) for more information.
doc="The full package import path for the generated code.",
284
290
),
291
+
"mock_names": attr.string_dict(
292
+
doc="Dictionary of interface name to mock name pairs to change the output names of the mock objects. Mock names default to 'Mock' prepended to the name of the interface.",
0 commit comments