Skip to content

Commit baf715e

Browse files
authored
refactor: drop golang.org/x/exp dependency (#4940)
Go 1.21 added the new slices package upstream so we drop usage of x/exp and use the stdlib package.
1 parent bf9d488 commit baf715e

File tree

3 files changed

+39
-39
lines changed

3 files changed

+39
-39
lines changed

NOTICE.txt

+37-37
Original file line numberDiff line numberDiff line change
@@ -12543,43 +12543,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1254312543
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1254412544

1254512545

12546-
--------------------------------------------------------------------------------
12547-
Dependency : golang.org/x/exp
12548-
Version: v0.0.0-20240506185415-9bf2ced13842
12549-
Licence type (autodetected): BSD-3-Clause
12550-
--------------------------------------------------------------------------------
12551-
12552-
Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240506185415-9bf2ced13842/LICENSE:
12553-
12554-
Copyright (c) 2009 The Go Authors. All rights reserved.
12555-
12556-
Redistribution and use in source and binary forms, with or without
12557-
modification, are permitted provided that the following conditions are
12558-
met:
12559-
12560-
* Redistributions of source code must retain the above copyright
12561-
notice, this list of conditions and the following disclaimer.
12562-
* Redistributions in binary form must reproduce the above
12563-
copyright notice, this list of conditions and the following disclaimer
12564-
in the documentation and/or other materials provided with the
12565-
distribution.
12566-
* Neither the name of Google Inc. nor the names of its
12567-
contributors may be used to endorse or promote products derived from
12568-
this software without specific prior written permission.
12569-
12570-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12571-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12572-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12573-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12574-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12575-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12576-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12577-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12578-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12579-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12580-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12581-
12582-
1258312546
--------------------------------------------------------------------------------
1258412547
Dependency : golang.org/x/lint
1258512548
Version: v0.0.0-20210508222113-6edffad5e616
@@ -45852,6 +45815,43 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4585245815
THE SOFTWARE.
4585345816

4585445817

45818+
--------------------------------------------------------------------------------
45819+
Dependency : golang.org/x/exp
45820+
Version: v0.0.0-20240506185415-9bf2ced13842
45821+
Licence type (autodetected): BSD-3-Clause
45822+
--------------------------------------------------------------------------------
45823+
45824+
Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240506185415-9bf2ced13842/LICENSE:
45825+
45826+
Copyright (c) 2009 The Go Authors. All rights reserved.
45827+
45828+
Redistribution and use in source and binary forms, with or without
45829+
modification, are permitted provided that the following conditions are
45830+
met:
45831+
45832+
* Redistributions of source code must retain the above copyright
45833+
notice, this list of conditions and the following disclaimer.
45834+
* Redistributions in binary form must reproduce the above
45835+
copyright notice, this list of conditions and the following disclaimer
45836+
in the documentation and/or other materials provided with the
45837+
distribution.
45838+
* Neither the name of Google Inc. nor the names of its
45839+
contributors may be used to endorse or promote products derived from
45840+
this software without specific prior written permission.
45841+
45842+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
45843+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
45844+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45845+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
45846+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45847+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
45848+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
45849+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
45850+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
45851+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
45852+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45853+
45854+
4585545855
--------------------------------------------------------------------------------
4585645856
Dependency : golang.org/x/mod
4585745857
Version: v0.17.0

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ require (
7575
go.opentelemetry.io/collector/receiver/otlpreceiver v0.102.1
7676
go.uber.org/zap v1.27.0
7777
golang.org/x/crypto v0.23.0
78-
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
7978
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
8079
golang.org/x/sync v0.7.0
8180
golang.org/x/sys v0.20.0
@@ -280,6 +279,7 @@ require (
280279
go.opentelemetry.io/otel/trace v1.27.0 // indirect
281280
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
282281
go.uber.org/multierr v1.11.0 // indirect
282+
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
283283
golang.org/x/mod v0.17.0 // indirect
284284
golang.org/x/net v0.25.0 // indirect
285285
golang.org/x/oauth2 v0.20.0 // indirect

internal/pkg/agent/application/upgrade/artifact/config_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ package artifact
66

77
import (
88
"reflect"
9+
"slices"
910
"testing"
1011
"time"
1112

1213
"github.com/stretchr/testify/assert"
1314
"github.com/stretchr/testify/require"
14-
"golang.org/x/exp/slices"
1515

1616
agentlibsconfig "github.com/elastic/elastic-agent-libs/config"
1717
"github.com/elastic/elastic-agent-libs/transport/httpcommon"

0 commit comments

Comments
 (0)