From f1e8610baa4ca2f61db78493b19664e1074c9010 Mon Sep 17 00:00:00 2001 From: anjmao Date: Thu, 12 Dec 2024 10:47:16 +0200 Subject: [PATCH] Bump go version --- .github/workflows/build.yaml | 6 +++--- export_handler.go | 2 ++ go.mod | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4dc2995..b3cd703 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,10 +20,10 @@ jobs: with: extra_args: --only-verified - - name: Setup Go 1.22 - uses: actions/setup-go@v5 + - name: Setup Go 1.23 + uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5 with: - go-version: '1.22.3' + go-version-file: "go.mod" - name: Run golangci-lint if: ${{ github.event_name == 'pull_request' && !contains(env.head_commit_message, '#skip-lint') }} diff --git a/export_handler.go b/export_handler.go index 585c085..67619e1 100644 --- a/export_handler.go +++ b/export_handler.go @@ -49,6 +49,8 @@ func (h *ExportHandler) Enabled(ctx context.Context, level slog.Level) bool { func (h *ExportHandler) Handle(ctx context.Context, record slog.Record) error { if record.Level >= h.cfg.MinLevel { select { + case <-ctx.Done(): + return ctx.Err() case h.ch <- record: default: } diff --git a/go.mod b/go.mod index a363cf9..018d0f7 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/castai/logging -go 1.22.3 +go 1.23.2 require ( github.com/stretchr/testify v1.9.0