Skip to content

Commit 4b74aec

Browse files
authored
Replace golang.org/x/exp with stdlib (#156)
1 parent 4a571d7 commit 4b74aec

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ require (
1414
github.com/open-policy-agent/opa v0.61.0
1515
github.com/stretchr/testify v1.8.4
1616
go.uber.org/zap v1.27.0
17-
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
1817
k8s.io/api v0.29.2
1918
k8s.io/apimachinery v0.29.2
2019
k8s.io/client-go v0.29.2
@@ -138,6 +137,7 @@ require (
138137
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
139138
go.uber.org/multierr v1.11.0 // indirect
140139
golang.org/x/crypto v0.19.0 // indirect
140+
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
141141
golang.org/x/net v0.19.0 // indirect
142142
golang.org/x/oauth2 v0.14.0 // indirect
143143
golang.org/x/sync v0.5.0 // indirect

reporthandling/datastructuresmethods.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ package reporthandling
33
import (
44
"fmt"
55
"hash/fnv"
6+
"slices"
67

78
"github.com/kubescape/k8s-interface/workloadinterface"
89
"github.com/kubescape/opa-utils/objectsenvelopes"
910
"github.com/kubescape/opa-utils/reporthandling/apis"
1011
"github.com/kubescape/opa-utils/reporthandling/attacktrack/v1alpha1"
1112
"github.com/mitchellh/mapstructure"
12-
"golang.org/x/exp/slices"
1313
)
1414

1515
const (

reporthandling/helpers/v1/listing.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"sync"
55

66
"github.com/kubescape/opa-utils/reporthandling/apis"
7-
"golang.org/x/exp/maps"
87
)
98

109
var allListsPool = &sync.Pool{
@@ -62,7 +61,7 @@ func (all *AllLists) Initialize(size int) {
6261
// Clear remove all items and reset the counters
6362
func (all *AllLists) Clear() {
6463
if all.itemToStatus != nil {
65-
maps.Clear(all.itemToStatus)
64+
clear(all.itemToStatus)
6665
all.passed = 0
6766
all.failed = 0
6867
all.skipped = 0

0 commit comments

Comments
 (0)