reference icon indicating copy to clipboard operation
reference copied to clipboard

Parsing images with digest is not clear

Open AbdelrahmanElawady opened this issue 1 year ago • 1 comments

Parsing images with digest like docker.io/library/nginx@sha256:ed6d2c43c8fbcd3eaa44c9dab6d94cb346234476230dc1681227aa72d07181ee using Parse doesn't work without having blank imports for a package that registers hash functions, for example having something like import _ "crypto/sha256".

go-digest mention that in their readme as it can lead to some confusion.

IMO, I think it should be mentioned somewhere that you need to have these imports or referencing go-digest for example as it is the package where this behavior originates but that's up to you.

playground link.

Thanks!

AbdelrahmanElawady avatar May 07 '24 22:05 AbdelrahmanElawady

Thanks, yeah this IS annoying. Mind opening a PR for README / godoc?

milosgajdos avatar May 08 '24 08:05 milosgajdos

Closing. Addressed by https://github.com/distribution/reference/pull/13

milosgajdos avatar Jul 22 '24 15:07 milosgajdos