From 5b34045651ce7934747a04a4b02d36945139be0c Mon Sep 17 00:00:00 2001 From: John Roesler Date: Mon, 6 Nov 2023 15:16:38 -0600 Subject: [PATCH] update golangci-lint --- .github/workflows/go_test.yml | 2 +- example_test.go | 2 +- executor.go | 1 - logger.go | 10 +++++----- scheduler_test.go | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/go_test.yml b/.github/workflows/go_test.yml index 9f19d0bd..b4f36c9e 100644 --- a/.github/workflows/go_test.yml +++ b/.github/workflows/go_test.yml @@ -21,7 +21,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3.7.0 with: - version: v1.53.1 + version: v1.55.2 - name: Install Go uses: actions/setup-go@v4 with: diff --git a/example_test.go b/example_test.go index e0c9d47c..1ba3624a 100644 --- a/example_test.go +++ b/example_test.go @@ -529,7 +529,7 @@ func ExampleWithLocation() { func ExampleWithLogger() { _, _ = NewScheduler( WithLogger( - NewJsonSlogLogger(slog.LevelInfo), + NewJSONSlogLogger(slog.LevelInfo), ), ) } diff --git a/executor.go b/executor.go index b53403d6..51e8a033 100644 --- a/executor.go +++ b/executor.go @@ -198,7 +198,6 @@ func (e *executor) start() { waitForJobs <- struct{}{} }() <-waiterCtx.Done() - }() // wait for per job singleton limit mode runner jobs to complete diff --git a/logger.go b/logger.go index 25f43cec..39982c9a 100644 --- a/logger.go +++ b/logger.go @@ -22,10 +22,10 @@ var _ Logger = (*noOpLogger)(nil) type noOpLogger struct{} -func (_ noOpLogger) Debug(_ string, _ ...any) {} -func (_ noOpLogger) Error(_ string, _ ...any) {} -func (_ noOpLogger) Info(_ string, _ ...any) {} -func (_ noOpLogger) Warn(_ string, _ ...any) {} +func (l noOpLogger) Debug(_ string, _ ...any) {} +func (l noOpLogger) Error(_ string, _ ...any) {} +func (l noOpLogger) Info(_ string, _ ...any) {} +func (l noOpLogger) Warn(_ string, _ ...any) {} var _ Logger = (*slogLogger)(nil) @@ -33,7 +33,7 @@ type slogLogger struct { sl *slog.Logger } -func NewJsonSlogLogger(level slog.Level) Logger { +func NewJSONSlogLogger(level slog.Level) Logger { return NewSlogLogger( slog.New( slog.NewJSONHandler( diff --git a/scheduler_test.go b/scheduler_test.go index 8d4ea95e..31683929 100644 --- a/scheduler_test.go +++ b/scheduler_test.go @@ -15,7 +15,7 @@ import ( func newTestScheduler(options ...SchedulerOption) (Scheduler, error) { // default test options out := []SchedulerOption{ - WithLogger(NewJsonSlogLogger(slog.LevelDebug)), + WithLogger(NewJSONSlogLogger(slog.LevelDebug)), WithStopTimeout(time.Second), }