INNER CODE UNIT · Go
convertFormats
opencontainers/image-spec · schema/backwards_compatibility_test.go:37
func convertFormats(input string) string {
out := input
for k, v := range compatMap {
out = strings.Replace(out, k, v, -1)
}
return out
}
func TestBackwardsCompatibilityImageIndex(t *testing.T) {
for i, tt := range []struct {
imageIndex string
digest digest.Digest
fail bool
}{
{
digest: "sha256:4ffd0883f25635999f04ea543240a27c9a4341979ff7d46a9774f71512eebb1f",
imageIndex: `{
"schemaVersion": 2,