diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 091d3bc..d07909c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: --health-timeout 5s --health-retries 5 - container: golang:1.21 + container: golang:1.24.0 steps: - uses: actions/checkout@v3 diff --git a/backends/memory/memory_backend.go b/backends/memory/memory_backend.go index 2479968..04b2802 100644 --- a/backends/memory/memory_backend.go +++ b/backends/memory/memory_backend.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "log/slog" "os" "sync" "time" @@ -17,7 +18,6 @@ import ( "github.com/iancoleman/strcase" "github.com/jsuar/go-cron-descriptor/pkg/crondescriptor" "github.com/robfig/cron" - "golang.org/x/exp/slog" ) const ( diff --git a/backends/memory/memory_backend_test.go b/backends/memory/memory_backend_test.go index ed4e703..ec4a0b3 100644 --- a/backends/memory/memory_backend_test.go +++ b/backends/memory/memory_backend_test.go @@ -3,6 +3,7 @@ package memory_test import ( "context" "fmt" + "log/slog" "os" "strconv" "strings" @@ -18,7 +19,6 @@ import ( "github.com/acaloiaro/neoq/testutils" "github.com/pkg/errors" "github.com/robfig/cron" - "golang.org/x/exp/slog" ) const ( @@ -75,7 +75,7 @@ func TestBasicJobProcessing(t *testing.T) { }, }) if e != nil || jid == jobs.DuplicateJobID { - slog.Error("job was not enqueued. either it was duplicate or this error caused it:", e) + slog.Error("job was not enqueued. either it was duplicate or this error caused it:", "error", e) } } }() @@ -149,7 +149,7 @@ func TestBackendConfiguration(t *testing.T) { }, }) if e != nil || jid == jobs.DuplicateJobID { - slog.Error("job was not enqueued. either it was duplicate or this error caused it:", e) + slog.Error("job was not enqueued. either it was duplicate or this error caused it:", "error", e) } } diff --git a/backends/postgres/postgres_backend_test.go b/backends/postgres/postgres_backend_test.go index 9d6e869..5850926 100644 --- a/backends/postgres/postgres_backend_test.go +++ b/backends/postgres/postgres_backend_test.go @@ -1144,7 +1144,7 @@ func TestProcessPendingJobs(t *testing.T) { ctx := context.Background() - nq, err := neoq.New(ctx, neoq.WithBackend(postgres.Backend), postgres.WithConnectionString(connString), neoq.WithPendingJobCheckInterval(time.Duration(50*time.Millisecond))) + nq, err := neoq.New(ctx, neoq.WithBackend(postgres.Backend), postgres.WithConnectionString(connString), neoq.WithPendingJobCheckInterval(50*time.Millisecond)) if err != nil { t.Fatal(err) } diff --git a/backends/redis/redis_backend.go b/backends/redis/redis_backend.go index 4de9ae4..86fbcff 100644 --- a/backends/redis/redis_backend.go +++ b/backends/redis/redis_backend.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "log" + "log/slog" "os" "runtime" "strings" @@ -20,7 +21,6 @@ import ( "github.com/hibiken/asynq" "github.com/iancoleman/strcase" "github.com/jsuar/go-cron-descriptor/pkg/crondescriptor" - "golang.org/x/exp/slog" ) // All jobs are placed on the same 'default' queue (until a compelling case is made for using different asynq queues diff --git a/go.mod b/go.mod index 9b42da3..5cdcc55 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/jsuar/go-cron-descriptor v0.1.0 github.com/pkg/errors v0.9.1 github.com/robfig/cron v1.2.0 - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 ) require ( diff --git a/go.sum b/go.sum index a992eb4..e2538e6 100644 --- a/go.sum +++ b/go.sum @@ -157,8 +157,6 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= diff --git a/gomod2nix.toml b/gomod2nix.toml index f9ceda0..44487e3 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -79,9 +79,6 @@ schema = 3 [mod."golang.org/x/crypto"] version = "v0.31.0" hash = "sha256-ZBjoG7ZOuTEmjaXPP9txAvjAjC46DeaLs0zrNzi8EQw=" - [mod."golang.org/x/exp"] - version = "v0.0.0-20230713183714-613f0c0eb8a1" - hash = "sha256-VLE9CCOYpTdyBWaQ1YxXpGOBS74wpIR3JJ+JVzNyEkQ=" [mod."golang.org/x/sync"] version = "v0.10.0" hash = "sha256-HWruKClrdoBKVdxKCyoazxeQV4dIYLdkHekQvx275/o=" diff --git a/handler/handler.go b/handler/handler.go index fd554af..f839f7c 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -4,12 +4,11 @@ import ( "context" "errors" "fmt" + "log/slog" "runtime" "runtime/debug" "strings" "time" - - "golang.org/x/exp/slog" ) const ( diff --git a/logging/logging.go b/logging/logging.go index 8746745..dc1f0c2 100644 --- a/logging/logging.go +++ b/logging/logging.go @@ -1,7 +1,7 @@ package logging import ( - "golang.org/x/exp/slog" + "log/slog" ) // Logger interface is the interface that neoq's logger must implement