Skip to content

Commit 9a9bf2c

Browse files
committed
fix(linter): updated linter and addressed ctx linting issue
1 parent 743a2bc commit 9a9bf2c

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ jobs:
1010
steps:
1111
- uses: actions/setup-go@v3
1212
with:
13-
go-version: '^1'
14-
13+
go-version: "^1"
14+
1515
- run: go version
1616

1717
- uses: actions/checkout@v3
1818

1919
- name: golangci-golint
2020
run: |
21-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2
21+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.63.4
2222
./bin/golangci-lint run -v ./...
23-

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Go Dep
22
vendor
3+
4+
# ignore golangci-lint binary if running locally
5+
bin/golangci-lint

lambda/rpc_function_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ func TestInvoke(t *testing.T) {
6464
}
6565

6666
func TestInvokeWithContext(t *testing.T) {
67-
key := struct{}{}
67+
// dummyKey creates a safe context to appease the linter
68+
type dummyKey struct{}
69+
var key dummyKey
6870
srv := NewFunction(&handlerOptions{
6971
handlerFunc: func(ctx context.Context, _ []byte) (io.Reader, error) {
7072
assert.Equal(t, "dummy", ctx.Value(key))

0 commit comments

Comments
 (0)