diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b570fe0dc..6d2cb2f71 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -47,6 +47,8 @@ jobs: with: go-version-file: go.mod - uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 + with: + version: v2.11.3 build: timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }} diff --git a/main.go b/main.go index 8a3abdf74..88c92d0f3 100644 --- a/main.go +++ b/main.go @@ -13,9 +13,7 @@ import ( ) func registerSignalHandler() context.Context { - ctx, cancel := context.WithCancel(context.Background()) //nolint:gosec - // cancel is called in signal handler goroutine, so it is not deferred here. - // hence, the linter warning is ignored. + ctx, cancel := context.WithCancel(context.Background()) sigs := make(chan os.Signal, 1) signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)