From a89c3bbf1c3869f5e29397ca5a078b60f8ad7ed4 Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 25 Apr 2024 18:11:41 +0200 Subject: [PATCH] pkg/dumps,hubtest: use yaml.v3 --- .golangci.yml | 7 ------- pkg/csplugin/broker_test.go | 2 +- pkg/dumps/bucket_dump.go | 2 +- pkg/dumps/parser_dump.go | 2 +- pkg/hubtest/coverage.go | 2 +- pkg/hubtest/hubtest_item.go | 2 +- pkg/hubtest/parser_assert.go | 2 +- pkg/hubtest/scenario_assert.go | 2 +- 8 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9f059aa8a..8e60a3ca8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -100,13 +100,6 @@ linters-settings: - "!**/pkg/appsec/appsec.go" - "!**/pkg/appsec/loader.go" - "!**/pkg/csplugin/broker.go" - - "!**/pkg/csplugin/broker_test.go" - - "!**/pkg/dumps/bucket_dump.go" - - "!**/pkg/dumps/parser_dump.go" - - "!**/pkg/hubtest/coverage.go" - - "!**/pkg/hubtest/hubtest_item.go" - - "!**/pkg/hubtest/parser_assert.go" - - "!**/pkg/hubtest/scenario_assert.go" - "!**/pkg/leakybucket/buckets_test.go" - "!**/pkg/leakybucket/manager_load.go" - "!**/pkg/metabase/metabase.go" diff --git a/pkg/csplugin/broker_test.go b/pkg/csplugin/broker_test.go index 9adb35ad7..59ac07126 100644 --- a/pkg/csplugin/broker_test.go +++ b/pkg/csplugin/broker_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/tomb.v2" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "github.com/crowdsecurity/go-cs-lib/cstest" diff --git a/pkg/dumps/bucket_dump.go b/pkg/dumps/bucket_dump.go index 5f5ce1c40..c09722cb0 100644 --- a/pkg/dumps/bucket_dump.go +++ b/pkg/dumps/bucket_dump.go @@ -5,7 +5,7 @@ import ( "os" "github.com/crowdsecurity/crowdsec/pkg/types" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type BucketPourInfo map[string][]types.Event diff --git a/pkg/dumps/parser_dump.go b/pkg/dumps/parser_dump.go index 9b4cdb1c2..227f96315 100644 --- a/pkg/dumps/parser_dump.go +++ b/pkg/dumps/parser_dump.go @@ -12,7 +12,7 @@ import ( "github.com/fatih/color" diff "github.com/r3labs/diff/v2" log "github.com/sirupsen/logrus" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "github.com/crowdsecurity/go-cs-lib/maptools" diff --git a/pkg/hubtest/coverage.go b/pkg/hubtest/coverage.go index dc3d1d13a..c992832ff 100644 --- a/pkg/hubtest/coverage.go +++ b/pkg/hubtest/coverage.go @@ -11,7 +11,7 @@ import ( "github.com/crowdsecurity/crowdsec/pkg/cwhub" "github.com/crowdsecurity/go-cs-lib/maptools" log "github.com/sirupsen/logrus" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) type Coverage struct { diff --git a/pkg/hubtest/hubtest_item.go b/pkg/hubtest/hubtest_item.go index b8a042f07..48fb67048 100644 --- a/pkg/hubtest/hubtest_item.go +++ b/pkg/hubtest/hubtest_item.go @@ -10,7 +10,7 @@ import ( "strings" log "github.com/sirupsen/logrus" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "github.com/crowdsecurity/crowdsec/pkg/csconfig" "github.com/crowdsecurity/crowdsec/pkg/cwhub" diff --git a/pkg/hubtest/parser_assert.go b/pkg/hubtest/parser_assert.go index 7eec8e535..e11561885 100644 --- a/pkg/hubtest/parser_assert.go +++ b/pkg/hubtest/parser_assert.go @@ -8,7 +8,7 @@ import ( "github.com/antonmedv/expr" log "github.com/sirupsen/logrus" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "github.com/crowdsecurity/crowdsec/pkg/dumps" "github.com/crowdsecurity/crowdsec/pkg/exprhelpers" diff --git a/pkg/hubtest/scenario_assert.go b/pkg/hubtest/scenario_assert.go index 5195b814e..c57269b99 100644 --- a/pkg/hubtest/scenario_assert.go +++ b/pkg/hubtest/scenario_assert.go @@ -10,7 +10,7 @@ import ( "github.com/antonmedv/expr" log "github.com/sirupsen/logrus" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "github.com/crowdsecurity/crowdsec/pkg/dumps" "github.com/crowdsecurity/crowdsec/pkg/exprhelpers"