diff --git a/cmd/aa-log/main.go b/cmd/aa-log/main.go index 89ca1d0b..cbc59c9e 100644 --- a/cmd/aa-log/main.go +++ b/cmd/aa-log/main.go @@ -9,10 +9,10 @@ import ( "fmt" "io" "os" + "slices" "strings" "github.com/roddhjav/apparmor.d/pkg/logs" - "golang.org/x/exp/slices" ) const usage = `aa-log [-h] [--systemd] [--file file] [--rules | --raw] [profile] diff --git a/go.mod b/go.mod index dcc7d81f..a8edd743 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,8 @@ module github.com/roddhjav/apparmor.d -go 1.21 +go 1.22 require ( github.com/arduino/go-paths-helper v1.12.0 - golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 - gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index 54661645..d44c37d1 100644 --- a/go.sum +++ b/go.sum @@ -6,11 +6,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pkg/aa/mount.go b/pkg/aa/mount.go index 0dac82ff..ee375860 100644 --- a/pkg/aa/mount.go +++ b/pkg/aa/mount.go @@ -5,9 +5,8 @@ package aa import ( + "slices" "strings" - - "golang.org/x/exp/slices" ) type MountConditions struct { diff --git a/pkg/aa/profile.go b/pkg/aa/profile.go index b5aa2d7b..2e97b9d4 100644 --- a/pkg/aa/profile.go +++ b/pkg/aa/profile.go @@ -7,11 +7,11 @@ package aa import ( "bytes" "reflect" + "slices" "sort" "strings" "github.com/arduino/go-paths-helper" - "golang.org/x/exp/slices" ) // Default Apparmor magic directory: /etc/apparmor.d/. diff --git a/pkg/aa/variables.go b/pkg/aa/variables.go index 6105cc30..ddd2e3d1 100644 --- a/pkg/aa/variables.go +++ b/pkg/aa/variables.go @@ -9,9 +9,8 @@ package aa import ( "regexp" + "slices" "strings" - - "golang.org/x/exp/slices" ) var ( diff --git a/pkg/logs/logs.go b/pkg/logs/logs.go index 28c14ffb..913f1172 100644 --- a/pkg/logs/logs.go +++ b/pkg/logs/logs.go @@ -7,11 +7,11 @@ package logs import ( "io" "regexp" + "slices" "strings" "github.com/roddhjav/apparmor.d/pkg/aa" "github.com/roddhjav/apparmor.d/pkg/util" - "golang.org/x/exp/slices" ) // Colors diff --git a/pkg/prebuild/builder/complain.go b/pkg/prebuild/builder/complain.go index 3dc04166..3970e6df 100644 --- a/pkg/prebuild/builder/complain.go +++ b/pkg/prebuild/builder/complain.go @@ -6,10 +6,10 @@ package builder import ( "regexp" + "slices" "strings" "github.com/roddhjav/apparmor.d/pkg/prebuild/cfg" - "golang.org/x/exp/slices" ) var ( diff --git a/pkg/prebuild/builder/core_test.go b/pkg/prebuild/builder/core_test.go index 3b620e6b..b0c59e77 100644 --- a/pkg/prebuild/builder/core_test.go +++ b/pkg/prebuild/builder/core_test.go @@ -5,9 +5,8 @@ package builder import ( + "slices" "testing" - - "golang.org/x/exp/slices" ) func TestBuilder_Apply(t *testing.T) { diff --git a/pkg/prebuild/builder/enforce.go b/pkg/prebuild/builder/enforce.go index 8c4aaccf..a3bd2c1d 100644 --- a/pkg/prebuild/builder/enforce.go +++ b/pkg/prebuild/builder/enforce.go @@ -5,10 +5,10 @@ package builder import ( + "slices" "strings" "github.com/roddhjav/apparmor.d/pkg/prebuild/cfg" - "golang.org/x/exp/slices" ) type Enforce struct { diff --git a/pkg/prebuild/cfg/os.go b/pkg/prebuild/cfg/os.go index aa995200..d792c490 100644 --- a/pkg/prebuild/cfg/os.go +++ b/pkg/prebuild/cfg/os.go @@ -6,10 +6,10 @@ package cfg import ( "os" + "slices" "strings" "github.com/arduino/go-paths-helper" - "golang.org/x/exp/slices" ) var ( diff --git a/pkg/prebuild/directive/exec.go b/pkg/prebuild/directive/exec.go index e0b1e2e1..db08ba6e 100644 --- a/pkg/prebuild/directive/exec.go +++ b/pkg/prebuild/directive/exec.go @@ -5,12 +5,12 @@ package directive import ( + "slices" "strings" "github.com/roddhjav/apparmor.d/pkg/aa" "github.com/roddhjav/apparmor.d/pkg/prebuild/cfg" "github.com/roddhjav/apparmor.d/pkg/util" - "golang.org/x/exp/slices" ) type Exec struct { diff --git a/pkg/prebuild/directive/filter.go b/pkg/prebuild/directive/filter.go index 8b5502ca..b4cc54af 100644 --- a/pkg/prebuild/directive/filter.go +++ b/pkg/prebuild/directive/filter.go @@ -6,10 +6,10 @@ package directive import ( "regexp" + "slices" "strings" "github.com/roddhjav/apparmor.d/pkg/prebuild/cfg" - "golang.org/x/exp/slices" ) type FilterOnly struct { diff --git a/pkg/prebuild/prepare/core_test.go b/pkg/prebuild/prepare/core_test.go index 0e8f913d..591bf838 100644 --- a/pkg/prebuild/prepare/core_test.go +++ b/pkg/prebuild/prepare/core_test.go @@ -7,11 +7,11 @@ package prepare import ( "os" "os/exec" + "slices" "testing" "github.com/arduino/go-paths-helper" "github.com/roddhjav/apparmor.d/pkg/prebuild/cfg" - "golang.org/x/exp/slices" ) func chdirGitRoot() { diff --git a/tests/integration/suite.go b/tests/integration/suite.go index 2cba683c..c1570842 100644 --- a/tests/integration/suite.go +++ b/tests/integration/suite.go @@ -10,7 +10,7 @@ import ( "github.com/arduino/go-paths-helper" "github.com/roddhjav/apparmor.d/pkg/logs" "github.com/roddhjav/apparmor.d/pkg/util" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) var (