v0.6
- Reinstate Client interface - 1b2ef82
- Refactoring - a82a43d
- Improve test coverage - 9bb5077
- Support pushing a manifest list from a layout - 8acb4ca
Refactoring notes
I noticed that the LayoutPath
interface is in the wrong package since it is ggcr-specific and the registry
package is intended to be general purpose. Similarly for the AppendToLayout
method of the Image
interface.
I tried moving these into the ggcr
package, but ended up not being able to generate the existing mocks because of limitations in counterfeiter and/or golang in the use of interfaces. Counterfeiter failed thus:
go list repeated package github.com/pivotal/image-relocation/pkg/registry/ggcr [github.com/pivotal/image-relocation/pkg/registry/ggcr.test] with different values
I also tried moving the LayoutPath
interface along with most of layout.go
into a path
package, but ended up with a package import cycle between ggcr
and path
.
So I settled for placing LayoutPath
in its own package, which at least gets it out of the registry
package.
I had to use a type assertion to enable me to move the AppendToLayout
method to the ggcr
package. Without a type assertion, I ended up with interfaces that either wouldn't compile or which caused counterfeiter to fail.