Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
add documentation about the supported args
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhodges committed Nov 2, 2019
1 parent 76373c6 commit 2991db8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,18 @@ prog.go:13:2: import "your/main/package/deal" is a program, not an importable pa

You can resolve that by setting the `source` parameter to the location of the
file with the interfaces you want in it.

## `gomock` arguments:

| Name | Default value | Type | Documentation |
|------|---------------|------|---------------|
| name | | string | The name of the target. (Required.) |
| library| | Label | The go_library to find the interfaces in. Required (even in source mode). |
| interfaces | | list of string | The names of interfaces in `library` to generate mocks for. (Required.) |
| out | | string | The file name to give the generated output. (Required.) |
| package | | string | The package name to use in the generated output. (See mockgen's `-package` documentation for the default value) |
| imports | | string\_dict | Dictionary of keys of package names and values of import paths to use the keys as the identifier to use when the generated output uses the given import path. See the gomock documentation on `-imports` for more information. |
| self\_package | | string | The full import path for the generated code. See the gomock documentation on `-self_package` for more infromation. |
| mock\_names | | string\_dict | Dictionary of interfaceName-mockName pairs of explicit mock names to use. Mock names default to 'Mock'+ interfaceName suffix. See the gomock documentation on `-mock_names` for more information. |
| copyright\_file | | Label | The file containing the copyright to prepend to the generated output. |
| aux\_files | | string\_list\_dict | A map from packages to auxilliary Go source files to load for those packages. Currently, assumes that the file (the value) is a path relative to the directory of `library` in the GOPATH. |

0 comments on commit 2991db8

Please sign in to comment.