Skip to content

Commit

Permalink
update golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRoesler committed Nov 6, 2023
1 parent 3fc9116 commit 5b34045
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func ExampleWithLocation() {
func ExampleWithLogger() {
_, _ = NewScheduler(
WithLogger(
NewJsonSlogLogger(slog.LevelInfo),
NewJSONSlogLogger(slog.LevelInfo),
),
)
}
Expand Down
1 change: 0 additions & 1 deletion executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ func (e *executor) start() {
waitForJobs <- struct{}{}
}()
<-waiterCtx.Done()

}()

// wait for per job singleton limit mode runner jobs to complete
Expand Down
10 changes: 5 additions & 5 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ 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)

type slogLogger struct {
sl *slog.Logger
}

func NewJsonSlogLogger(level slog.Level) Logger {
func NewJSONSlogLogger(level slog.Level) Logger {
return NewSlogLogger(
slog.New(
slog.NewJSONHandler(
Expand Down
2 changes: 1 addition & 1 deletion scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

Expand Down

0 comments on commit 5b34045

Please sign in to comment.