Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Commit 789f467

Browse files
authored
Upgrade to Go 1.19 (#2368)
* Upgrade to Go 1.19 * Fix gofmt
1 parent f30eb3a commit 789f467

File tree

31 files changed

+250
-263
lines changed

31 files changed

+250
-263
lines changed

.github/workflows/ci.yaml

+6-18
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,10 @@ jobs:
2626

2727
- uses: actions/setup-go@v3
2828
with:
29-
go-version: '1.18'
29+
go-version: '1.19'
3030

31-
- uses: actions/cache@v3
32-
with:
33-
path: |
34-
~/go/pkg/mod
35-
key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }}
36-
restore-keys: |
37-
${{ runner.os }}-go-test-
38-
${{ runner.os }}-go-
31+
- name: Download modules
32+
run: go mod download
3933

4034
- name: go-test
4135
shell: bash
@@ -74,16 +68,10 @@ jobs:
7468

7569
- uses: actions/setup-go@v3
7670
with:
77-
go-version: '1.18'
71+
go-version: '1.19'
7872

79-
- uses: actions/cache@v3
80-
with:
81-
path: |
82-
~/go/pkg/mod
83-
key: ${{ runner.os }}-go-lint-${{ hashFiles('**/go.sum') }}
84-
restore-keys: |
85-
${{ runner.os }}-go-lint-
86-
${{ runner.os }}-go-
73+
- name: Download modules
74+
run: go mod download
8775

8876
- name: go-lint
8977
shell: bash

Makefile

+14-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,24 @@ GO_FILES = $(shell find . -name \*.go)
1818
MD_FILES = $(shell find . -name \*.md)
1919
PO_FILES = $(shell find . -name \*.po)
2020

21+
# diff-check runs git-diff and fails if there are any changes.
22+
diff-check:
23+
@FINDINGS="$$(git status -s -uall)" ; \
24+
if [ -n "$${FINDINGS}" ]; then \
25+
echo "Changed files:\n\n" ; \
26+
echo "$${FINDINGS}\n\n" ; \
27+
echo "Diffs:\n\n" ; \
28+
git diff ; \
29+
git diff --cached ; \
30+
exit 1 ; \
31+
fi
32+
.PHONY: diff-check
33+
2134
generate:
2235
@go generate ./...
2336
.PHONY: generate
2437

25-
generate-check: generate
26-
@git update-index --refresh && git diff-index --quiet HEAD --
38+
generate-check: generate diff-check
2739
.PHONY: generate-check
2840

2941
# lint uses the same linter as CI and tries to report the same results running

0 commit comments

Comments
 (0)