From 88351da9b687ab1fd73a458afa8f5cef88afb4ad Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Thu, 9 May 2024 11:21:36 -0400 Subject: [PATCH 1/2] Update bmc-toolbox/common --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3a6471f8..81500ee4 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22 require ( github.com/beevik/etree v1.3.0 - github.com/bmc-toolbox/common v0.0.0-20230220061748-93ff001f4a1d + github.com/bmc-toolbox/common v0.0.0-20240426155832-c9882dbabcca github.com/dselans/dmidecode v0.0.0-20180814053009-65c3f9d81910 github.com/pkg/errors v0.9.1 github.com/r3labs/diff/v3 v3.0.1 diff --git a/go.sum b/go.sum index 0a68e3c5..8fe7248b 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/beevik/etree v1.3.0 h1:hQTc+pylzIKDb23yYprodCWWTt+ojFfUZyzU09a/hmU= github.com/beevik/etree v1.3.0/go.mod h1:aiPf89g/1k3AShMVAzriilpcE4R/Vuor90y83zVZWFc= -github.com/bmc-toolbox/common v0.0.0-20230220061748-93ff001f4a1d h1:cQ30Wa8mhLzK1TSOG+g3FlneIsXtFgun61mmPwVPmD0= -github.com/bmc-toolbox/common v0.0.0-20230220061748-93ff001f4a1d/go.mod h1:SY//n1PJjZfbFbmAsB6GvEKbc7UXz3d30s3kWxfJQ/c= +github.com/bmc-toolbox/common v0.0.0-20240426155832-c9882dbabcca h1:8hmbfSQ3cR0KXyAegrgmv9ic2eyDLdYl9j6819dkKb0= +github.com/bmc-toolbox/common v0.0.0-20240426155832-c9882dbabcca/go.mod h1:SY//n1PJjZfbFbmAsB6GvEKbc7UXz3d30s3kWxfJQ/c= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= From c9739e791c2bb45821d7715464e885851a6dcf97 Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Thu, 9 May 2024 11:23:34 -0400 Subject: [PATCH 2/2] Drop golang.org/x/exp/slices for stdlib slices Now that the stdlib has slices.Contains we do not need to use x/exp/slices. --- actions/inventory.go | 2 +- go.mod | 1 - go.sum | 2 -- utils/mvcli.go | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/actions/inventory.go b/actions/inventory.go index bff08bc6..a0e92b78 100644 --- a/actions/inventory.go +++ b/actions/inventory.go @@ -5,6 +5,7 @@ import ( "context" "encoding/json" "runtime/debug" + "slices" "strings" "github.com/bmc-toolbox/common" @@ -14,7 +15,6 @@ import ( "github.com/pkg/errors" "github.com/r3labs/diff/v3" "github.com/sirupsen/logrus" - "golang.org/x/exp/slices" ) var ( diff --git a/go.mod b/go.mod index 81500ee4..78b1ffd9 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,6 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 github.com/tidwall/gjson v1.17.1 - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 golang.org/x/net v0.25.0 ) diff --git a/go.sum b/go.sum index 8fe7248b..7cde910b 100644 --- a/go.sum +++ b/go.sum @@ -42,8 +42,6 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/utils/mvcli.go b/utils/mvcli.go index e0ac31ab..59b48240 100644 --- a/utils/mvcli.go +++ b/utils/mvcli.go @@ -7,13 +7,13 @@ import ( "io" "os" "regexp" + "slices" "strconv" "strings" "github.com/bmc-toolbox/common" "github.com/metal-toolbox/ironlib/model" "github.com/pkg/errors" - "golang.org/x/exp/slices" ) const (