Skip to content

Commit

Permalink
go.mod: replace golang.org/x/exp/slices with slices
Browse files Browse the repository at this point in the history
Since we updated the go version to 1.21, we can use the stdlib slices
package, instead of the x/exp version of it.
  • Loading branch information
achilleas-k committed Aug 10, 2024
1 parent 3221a15 commit fee2848
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 1,782 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ require (
github.com/stretchr/testify v1.9.0
github.com/ubccr/kerby v0.0.0-20170626144437-201a958fc453
github.com/vmware/govmomi v0.39.0
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8
golang.org/x/oauth2 v0.22.0
golang.org/x/sys v0.24.0
golang.org/x/tools v0.24.0
Expand Down Expand Up @@ -154,6 +153,7 @@ require (
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sync v0.8.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion internal/otkdisk/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package otkdisk
import (
"fmt"

"golang.org/x/exp/slices"
"slices"

"github.com/osbuild/images/pkg/disk"
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/cloud/awscloud/awscloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"os"
"time"

"slices"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/request"
Expand All @@ -17,7 +19,6 @@ import (
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/sirupsen/logrus"
"golang.org/x/exp/slices"
)

type AWS struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/disk/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ import (
"reflect"
"strings"

"slices"

"github.com/google/uuid"
"golang.org/x/exp/slices"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/distro/distro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"strings"
"testing"

"slices"

"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/pkg/blueprint"
"github.com/osbuild/images/pkg/container"
Expand All @@ -17,7 +19,6 @@ import (
"github.com/osbuild/images/pkg/rpmmd"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
)

// Ensure that all package sets defined in the package set chains are defined for the image type
Expand Down
3 changes: 2 additions & 1 deletion pkg/distro/fedora/imagetype.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"math/rand"
"strings"

"slices"

"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/internal/environment"
"github.com/osbuild/images/internal/workload"
Expand All @@ -18,7 +20,6 @@ import (
"github.com/osbuild/images/pkg/platform"
"github.com/osbuild/images/pkg/policies"
"github.com/osbuild/images/pkg/rpmmd"
"golang.org/x/exp/slices"
)

type imageFunc func(workload workload.Workload, t *imageType, bp *blueprint.Blueprint, options distro.ImageOptions, packageSets map[string]rpmmd.PackageSet, containers []container.SourceSpec, rng *rand.Rand) (image.ImageKind, error)
Expand Down
2 changes: 1 addition & 1 deletion pkg/distro/rhel/imagetype.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"math/rand"

"golang.org/x/exp/slices"
"slices"

"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/internal/environment"
Expand Down
2 changes: 1 addition & 1 deletion pkg/distro/rhel/rhel10/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

"golang.org/x/exp/slices"
"slices"

"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/pkg/blueprint"
Expand Down
2 changes: 1 addition & 1 deletion pkg/distro/rhel/rhel8/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

"golang.org/x/exp/slices"
"slices"

"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/pkg/blueprint"
Expand Down
2 changes: 1 addition & 1 deletion pkg/distro/rhel/rhel9/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

"golang.org/x/exp/slices"
"slices"

"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/pkg/blueprint"
Expand Down
3 changes: 2 additions & 1 deletion pkg/osbuild/anaconda_stage.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package osbuild

import (
"slices"

"github.com/osbuild/images/pkg/customizations/anaconda"
"golang.org/x/exp/slices"
)

type AnacondaStageOptions struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/osbuild/bootc_install_to_filesystem_stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package osbuild
import (
"fmt"

"slices"

"github.com/osbuild/images/pkg/platform"
"golang.org/x/exp/slices"
)

type BootcInstallToFilesystemOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/osbuild/cloud_init_stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package osbuild
import (
"fmt"

"golang.org/x/exp/slices"
"slices"
)

type CloudInitStageOptions struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/osbuild/rpm_stage.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package osbuild

import (
"slices"

"github.com/osbuild/images/pkg/rpmmd"
"golang.org/x/exp/slices"
)

type RPMStageOptions struct {
Expand Down
50 changes: 0 additions & 50 deletions vendor/golang.org/x/exp/constraints/constraints.go

This file was deleted.

44 changes: 0 additions & 44 deletions vendor/golang.org/x/exp/slices/cmp.go

This file was deleted.

Loading

0 comments on commit fee2848

Please sign in to comment.