Remove direct dep on golang.org/x/exp (#2695)

Signed-off-by: Matej Vašek <mvasek@redhat.com>
This commit is contained in:
Matej Vašek 2025-03-10 19:14:36 +01:00 committed by GitHub
parent fa79d313e0
commit 2b831f9b2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

2
go.mod
View File

@ -49,7 +49,6 @@ require (
github.com/tektoncd/pipeline v0.65.1
github.com/xanzy/go-gitlab v0.102.0
golang.org/x/crypto v0.33.0
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
golang.org/x/net v0.35.0
golang.org/x/oauth2 v0.26.0
golang.org/x/sync v0.11.0
@ -273,6 +272,7 @@ require (
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac // indirect
golang.org/x/mod v0.23.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/time v0.10.0 // indirect

View File

@ -9,6 +9,7 @@ import (
"fmt"
"io"
"io/fs"
"maps"
"net/url"
"os"
"path/filepath"
@ -29,7 +30,6 @@ import (
"github.com/openshift/source-to-image/pkg/build/strategies"
s2idocker "github.com/openshift/source-to-image/pkg/docker"
"github.com/openshift/source-to-image/pkg/scm/git"
"golang.org/x/exp/maps"
"golang.org/x/term"
"knative.dev/func/pkg/builders"
@ -395,7 +395,7 @@ func s2iScriptURL(ctx context.Context, cli DockerClient, image string) (string,
if err != nil {
return "", fmt.Errorf("cannot parse image name: %w", err)
}
if _, ok := ref.(name.Tag); ok && !slices.Contains(maps.Values(DefaultBuilderImages), image) {
if _, ok := ref.(name.Tag); ok && !slices.Contains(slices.Collect(maps.Values(DefaultBuilderImages)), image) {
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")
}
img, err = remote.Image(ref)