Skip to content

Commit eae4eb0

Browse files
committed
Update README regarding gomock and mockgen
We no longer install `mockgen` as it's just imported as a library, not as a binary, so we only have 1 tool to install, and it should also be consistent with the `gomock` library referenced in `go.mod`. We can [skip ci] since we're not updating any code.
1 parent 4638d98 commit eae4eb0

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $ ./crbot [options]
3232

3333
## Developing
3434

35-
Install [GoMock](https://github.com/golang/mock):
35+
Install the `mockgen` tool from [GoMock](https://github.com/golang/mock):
3636

3737
```bash
3838
$ go install github.com/golang/mock/mockgen@v1.6.0
@@ -44,17 +44,18 @@ Generate the mocks:
4444
$ go generate ./...
4545
```
4646

47-
This specific version of both `gomock` and `mockgen` tools is what's used in
48-
this repo, and tests will fail if your version of these tools generates
49-
different code, including comments.
47+
This specific version of the `mockgen` tool is what's used in this repo, and
48+
tests will fail if your version generates different code, including comments.
5049

51-
To update the versions of these tools used in this repo:
50+
To update the version of the tools used in this repo:
5251

53-
1. update the version numbers in this file (above) as well as in
52+
1. update the version number in this file (above) as well as in
5453
[`.github/workflows/main.yml`](.github/workflows/main.yml) and
55-
[`go.mod`](go.mod) to match
54+
[`go.mod`](go.mod) (see entry for `github.com/golang/mock`) to match —
55+
note that you should use the same version for `mockgen` as for the
56+
`github.com/golang/mock` repo to ensure they're mutually-consistent
5657
1. run `go mod tidy` to update the `go.sum` file
57-
1. run the updated `go get` commands above to get newer versions of the tools
58+
1. run the updated `go install` command above to get newer version of `mockgen`
5859
1. run the `go generate` command above to regenerate the mocks
5960
1. [run the tests](#testing) from the top-level of the tree
6061
1. commit your changes to this file (`README.md`), `go.mod`, `go.sum`, and

0 commit comments

Comments
 (0)