Skip to content

Commit ed756ff

Browse files
committed
Use distribution's reference.ParseDockerRef
Using the cri utility caused other project to have containerd/cri as a dependency, only for this utility. The new `reference.ParseDockerRef` function does the same (other than having a different name). Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 525802f) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 2fb3823 commit ed756ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

images/archive/reference.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ package archive
1919
import (
2020
"strings"
2121

22-
"github.com/containerd/cri/pkg/util"
23-
digest "github.com/opencontainers/go-digest"
22+
"github.com/docker/distribution/reference"
23+
"github.com/opencontainers/go-digest"
2424
"github.com/pkg/errors"
2525
)
2626

@@ -69,7 +69,7 @@ func isImagePrefix(s, prefix string) bool {
6969

7070
func normalizeReference(ref string) (string, error) {
7171
// TODO: Replace this function to not depend on reference package
72-
normalized, err := util.NormalizeImageRef(ref)
72+
normalized, err := reference.ParseDockerRef(ref)
7373
if err != nil {
7474
return "", errors.Wrapf(err, "normalize image ref %q", ref)
7575
}

0 commit comments

Comments
 (0)