misc: address double import

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
pull/4329/head
Hidde Beydals 1 year ago
parent a2a3b4f00f
commit 43c2359705
No known key found for this signature in database
GPG Key ID: 979F380FC2341744

@ -28,7 +28,6 @@ import (
"github.com/google/go-containerregistry/pkg/crane" "github.com/google/go-containerregistry/pkg/crane"
"github.com/google/go-containerregistry/pkg/logs" "github.com/google/go-containerregistry/pkg/logs"
"github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/name"
reg "github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1/remote" "github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/google/go-containerregistry/pkg/v1/remote/transport" "github.com/google/go-containerregistry/pkg/v1/remote/transport"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@ -266,12 +265,12 @@ func pushArtifactCmdRun(cmd *cobra.Command, args []string) error {
return fmt.Errorf("pushing artifact failed: %w", err) return fmt.Errorf("pushing artifact failed: %w", err)
} }
digest, err := reg.NewDigest(digestURL) digest, err := name.NewDigest(digestURL)
if err != nil { if err != nil {
return fmt.Errorf("artifact digest parsing failed: %w", err) return fmt.Errorf("artifact digest parsing failed: %w", err)
} }
tag, err := reg.NewTag(url) tag, err := name.NewTag(url)
if err != nil { if err != nil {
return fmt.Errorf("artifact tag parsing failed: %w", err) return fmt.Errorf("artifact tag parsing failed: %w", err)
} }

Loading…
Cancel
Save