Skip to content

Commit 4638d98

Browse files
committed
Update to Go 1.16 as minimum requirement
* Add newer Go versions (1.19, 1.18, 1.17) to CI config * Update `go.mod` to list Go 1.16 * Update `go get` commands for mockgen to `go install` instead in GitHub Actions config as well as in the README * We don't need to install `gomock` as it's only a library dependency, not a binary, and will be automatically downloaded during the build * Drop versions 1.15, 1.14, 1.13, and 1.12 from CI config and docs; they're quite old at this point, and not supported by the Go team anyway * Drop Go module instructions in the README for Go 1.11 and 1.12
1 parent 2fbfc69 commit 4638d98

3 files changed

Lines changed: 5 additions & 17 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ${{ matrix.os }}
2626
strategy:
2727
matrix:
28-
go: [ '1.16', '1.15', '1.14', '1.13', '1.12' ]
28+
go: [ '1.19', '1.18', '1.17', '1.16' ]
2929
os: [ 'ubuntu-22.04', 'macos-12' ]
3030
name: Go ${{ matrix.go }} (${{ matrix.os }})
3131
steps:
@@ -41,9 +41,7 @@ jobs:
4141
run: go build -v ./...
4242

4343
- name: Install dependencies for testing
44-
run: |
45-
go get github.com/golang/mock/gomock@v1.6.0
46-
go get github.com/golang/mock/mockgen@v1.6.0
44+
run: go install github.com/golang/mock/mockgen@v1.6.0
4745

4846
- name: Generate mocks for testing
4947
run: go generate ./...

README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,13 @@
1111
[godoc-badge]: https://img.shields.io/badge/godoc-reference-5272B4.svg
1212
[godoc-url]: https://godoc.org/github.com/google/code-review-bot
1313

14-
## Prerequisites
15-
16-
Ensure that you have installed Go 1.11 or higher to enable support for [Go
17-
modules](https://github.com/golang/go/wiki/Modules) via `go mod`.
18-
19-
If you're using Go 1.11 or 1.12, set the environment variable `GO111MODULE=on`
20-
(Go 1.13 and later versions [automatically enable module
21-
support](https://blog.golang.org/modules2019)).
22-
2314
## Building
2415

2516
To build the `crbot` tool without a cloned repo (assuming that `$GOPATH/bin` is
2617
in your `$PATH`):
2718

2819
```bash
29-
$ go get github.com/google/code-review-bot/cmd/crbot
20+
$ go install github.com/google/code-review-bot/cmd/crbot@latest
3021
$ crbot [options]
3122
```
3223

@@ -44,8 +35,7 @@ $ ./crbot [options]
4435
Install [GoMock](https://github.com/golang/mock):
4536

4637
```bash
47-
$ go get github.com/golang/mock/gomock@v1.6.0
48-
$ go get github.com/golang/mock/mockgen@v1.6.0
38+
$ go install github.com/golang/mock/mockgen@v1.6.0
4939
```
5040

5141
Generate the mocks:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/google/code-review-bot
22

3-
go 1.12
3+
go 1.16
44

55
require (
66
github.com/go-yaml/yaml v2.1.0+incompatible

0 commit comments

Comments
 (0)