Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit df1f28a

Browse files
authored
fix: initial module in golint presubmit check (#818)
1 parent b781ad8 commit df1f28a

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/ci2.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,18 @@ jobs:
2525
runs-on: ubuntu-latest
2626
container: golang:latest
2727
steps:
28-
- run: gofmtdiff=$(gofmt -s -d .) && if [ -n "$gofmtdiff" ]; then printf 'gofmt -s found:\n%s\n' "$gofmtdiff" && exit 1; fi
29-
- run: go get -u golang.org/x/lint/golint && golintlint=$($GOPATH/bin/golint ./...) && if [ -n "$golintlint" ]; then printf 'golint found:\n%s\n' "$golintlint" && exit 1; fi
28+
- run: |
29+
gofmtdiff=$(gofmt -s -d .)
30+
if [ -n "$gofmtdiff" ]
31+
then
32+
printf 'gofmt -s found:\n%s\n' "$gofmtdiff" && exit 1;
33+
fi
34+
- run: |
35+
go mod init tools
36+
go get -u golang.org/x/lint/golint
37+
go install golang.org/x/lint/golint
38+
golintlint=$(golint ./...)
39+
if [ -n "$golintlint" ]
40+
then
41+
printf 'golint found:\n%s\n' "$golintlint" && exit 1
42+
fi

0 commit comments

Comments
 (0)