From c250cf013c9c523e8e5d095de509e002227c96f4 Mon Sep 17 00:00:00 2001 From: Martin Redolatti Date: Tue, 26 Mar 2024 11:43:00 -0300 Subject: [PATCH] switch to v6 --- Makefile | 11 +++++++++++ asynctask/asynctasks.go | 4 ++-- asynctask/asynctasks_test.go | 2 +- backoff/mocks/mocks.go | 2 +- datastructures/cache/multilevel.go | 2 +- datastructures/cache/multilevel_test.go | 2 +- go.mod | 2 +- logging/levels_test.go | 2 +- redis/helpers/helpers.go | 2 +- redis/helpers/helpers_test.go | 4 ++-- redis/mocks/mocks.go | 2 +- sse/sse.go | 4 ++-- sse/sse_test.go | 2 +- struct/jsonvalidator/validator.go | 2 +- workerpool/workerpool.go | 4 ++-- workerpool/workerpool_test.go | 2 +- 16 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2b35782 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +GO ?= go + +.PHONY: test test-norace + +test: + $(GO) test ./... -count=1 -race + +test-norace: + $(GO) test ./... -count=1 + + diff --git a/asynctask/asynctasks.go b/asynctask/asynctasks.go index 06a04ac..226a898 100644 --- a/asynctask/asynctasks.go +++ b/asynctask/asynctasks.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/splitio/go-toolkit/v5/logging" - "github.com/splitio/go-toolkit/v5/struct/traits/lifecycle" + "github.com/splitio/go-toolkit/v6/logging" + "github.com/splitio/go-toolkit/v6/struct/traits/lifecycle" ) // AsyncTask is a struct that wraps tasks that should run periodically and can be remotely stopped & started, diff --git a/asynctask/asynctasks_test.go b/asynctask/asynctasks_test.go index 5e60665..b1012fb 100644 --- a/asynctask/asynctasks_test.go +++ b/asynctask/asynctasks_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/splitio/go-toolkit/v5/logging" + "github.com/splitio/go-toolkit/v6/logging" ) func TestAsyncTaskNormalOperation(t *testing.T) { diff --git a/backoff/mocks/mocks.go b/backoff/mocks/mocks.go index dca07d8..555fc80 100644 --- a/backoff/mocks/mocks.go +++ b/backoff/mocks/mocks.go @@ -1,7 +1,7 @@ package mocks import ( - "github.com/splitio/go-toolkit/v5/backoff" + "github.com/splitio/go-toolkit/v6/backoff" "github.com/stretchr/testify/mock" "time" ) diff --git a/datastructures/cache/multilevel.go b/datastructures/cache/multilevel.go index 917eb8d..0c2254e 100644 --- a/datastructures/cache/multilevel.go +++ b/datastructures/cache/multilevel.go @@ -3,7 +3,7 @@ package cache import ( "context" - "github.com/splitio/go-toolkit/v5/logging" + "github.com/splitio/go-toolkit/v6/logging" ) // MLCLayer is the interface that should be implemented for all caching structs to be used with this piece of code. diff --git a/datastructures/cache/multilevel_test.go b/datastructures/cache/multilevel_test.go index c3549d2..22d2907 100644 --- a/datastructures/cache/multilevel_test.go +++ b/datastructures/cache/multilevel_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/splitio/go-toolkit/v5/logging" + "github.com/splitio/go-toolkit/v6/logging" ) type LayerMock struct { diff --git a/go.mod b/go.mod index 5585cea..11a1f1c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/splitio/go-toolkit/v5 +module github.com/splitio/go-toolkit/v6 go 1.21 diff --git a/logging/levels_test.go b/logging/levels_test.go index 21ef84d..8fde475 100644 --- a/logging/levels_test.go +++ b/logging/levels_test.go @@ -3,7 +3,7 @@ package logging import ( "testing" - "github.com/splitio/go-toolkit/v5/logging/mocks" + "github.com/splitio/go-toolkit/v6/logging/mocks" ) func TestErrorLevel(t *testing.T) { diff --git a/redis/helpers/helpers.go b/redis/helpers/helpers.go index fb728b0..0807d30 100644 --- a/redis/helpers/helpers.go +++ b/redis/helpers/helpers.go @@ -3,7 +3,7 @@ package helpers import ( "fmt" - "github.com/splitio/go-toolkit/v5/redis" + "github.com/splitio/go-toolkit/v6/redis" ) const ( diff --git a/redis/helpers/helpers_test.go b/redis/helpers/helpers_test.go index dca3cd4..d968aa0 100644 --- a/redis/helpers/helpers_test.go +++ b/redis/helpers/helpers_test.go @@ -4,8 +4,8 @@ import ( "errors" "testing" - "github.com/splitio/go-toolkit/v5/redis" - "github.com/splitio/go-toolkit/v5/redis/mocks" + "github.com/splitio/go-toolkit/v6/redis" + "github.com/splitio/go-toolkit/v6/redis/mocks" ) func TestEnsureConnected(t *testing.T) { diff --git a/redis/mocks/mocks.go b/redis/mocks/mocks.go index 88b180a..fb84349 100644 --- a/redis/mocks/mocks.go +++ b/redis/mocks/mocks.go @@ -3,7 +3,7 @@ package mocks import ( "time" - "github.com/splitio/go-toolkit/v5/redis" + "github.com/splitio/go-toolkit/v6/redis" ) // MockResultOutput mocks struct diff --git a/sse/sse.go b/sse/sse.go index 5c533de..cca3354 100644 --- a/sse/sse.go +++ b/sse/sse.go @@ -9,8 +9,8 @@ import ( "sync" "time" - "github.com/splitio/go-toolkit/v5/logging" - "github.com/splitio/go-toolkit/v5/struct/traits/lifecycle" + "github.com/splitio/go-toolkit/v6/logging" + "github.com/splitio/go-toolkit/v6/struct/traits/lifecycle" ) const ( diff --git a/sse/sse_test.go b/sse/sse_test.go index df6f2b3..59e256b 100644 --- a/sse/sse_test.go +++ b/sse/sse_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/splitio/go-toolkit/v5/logging" + "github.com/splitio/go-toolkit/v6/logging" ) func TestSSEErrorConnecting(t *testing.T) { diff --git a/struct/jsonvalidator/validator.go b/struct/jsonvalidator/validator.go index 8aa70ea..151c5e4 100644 --- a/struct/jsonvalidator/validator.go +++ b/struct/jsonvalidator/validator.go @@ -6,7 +6,7 @@ import ( "reflect" "strings" - "github.com/splitio/go-toolkit/v5/datastructures/set" + "github.com/splitio/go-toolkit/v6/datastructures/set" ) func getFieldsForStructRecursive(prefix string, structType reflect.Type) []string { diff --git a/workerpool/workerpool.go b/workerpool/workerpool.go index b763dae..9018a14 100644 --- a/workerpool/workerpool.go +++ b/workerpool/workerpool.go @@ -5,8 +5,8 @@ import ( "sync" "time" - "github.com/splitio/go-toolkit/v5/logging" - "github.com/splitio/go-toolkit/v5/struct/traits/lifecycle" + "github.com/splitio/go-toolkit/v6/logging" + "github.com/splitio/go-toolkit/v6/struct/traits/lifecycle" ) const ( diff --git a/workerpool/workerpool_test.go b/workerpool/workerpool_test.go index 04acbd2..9606b7f 100644 --- a/workerpool/workerpool_test.go +++ b/workerpool/workerpool_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/splitio/go-toolkit/v5/logging" + "github.com/splitio/go-toolkit/v6/logging" ) var resMutex sync.RWMutex