Skip to content

Commit 2b831f9

Browse files
authored
Remove direct dep on golang.org/x/exp (#2695)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
1 parent fa79d31 commit 2b831f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ require (
4949
github.com/tektoncd/pipeline v0.65.1
5050
github.com/xanzy/go-gitlab v0.102.0
5151
golang.org/x/crypto v0.33.0
52-
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
5352
golang.org/x/net v0.35.0
5453
golang.org/x/oauth2 v0.26.0
5554
golang.org/x/sync v0.11.0
@@ -273,6 +272,7 @@ require (
273272
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
274273
go.uber.org/multierr v1.11.0 // indirect
275274
go.uber.org/zap v1.27.0 // indirect
275+
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac // indirect
276276
golang.org/x/mod v0.23.0 // indirect
277277
golang.org/x/text v0.22.0 // indirect
278278
golang.org/x/time v0.10.0 // indirect

pkg/builders/s2i/builder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"fmt"
1010
"io"
1111
"io/fs"
12+
"maps"
1213
"net/url"
1314
"os"
1415
"path/filepath"
@@ -29,7 +30,6 @@ import (
2930
"github.com/openshift/source-to-image/pkg/build/strategies"
3031
s2idocker "github.com/openshift/source-to-image/pkg/docker"
3132
"github.com/openshift/source-to-image/pkg/scm/git"
32-
"golang.org/x/exp/maps"
3333
"golang.org/x/term"
3434

3535
"knative.dev/func/pkg/builders"
@@ -395,7 +395,7 @@ func s2iScriptURL(ctx context.Context, cli DockerClient, image string) (string,
395395
if err != nil {
396396
return "", fmt.Errorf("cannot parse image name: %w", err)
397397
}
398-
if _, ok := ref.(name.Tag); ok && !slices.Contains(maps.Values(DefaultBuilderImages), image) {
398+
if _, ok := ref.(name.Tag); ok && !slices.Contains(slices.Collect(maps.Values(DefaultBuilderImages)), image) {
399399
fmt.Fprintln(os.Stderr, "image referenced by tag which is discouraged: Tags are mutable and can point to a different artifact than the expected one")
400400
}
401401
img, err = remote.Image(ref)

0 commit comments

Comments
 (0)