pkg/reference: remove deprecated SplitObject

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-06-28 18:45:43 +02:00
parent fec33aa735
commit a723c0c6ea
2 changed files with 0 additions and 53 deletions

View File

@@ -192,33 +192,3 @@ func TestReferenceParser(t *testing.T) {
})
}
}
func BenchmarkSplitObject(b *testing.B) {
inputs := []string{
"",
"@",
"docker.io@",
"@digest",
"docker.io/library/redis:foo?fooo=asdf",
"docker.io/library/redis:foo@sha256:abcdef?fooo=asdf",
"docker.io/library/redis@sha256:abcdef?fooo=asdf",
"docker.io/library/redis:obj@abcdef?fooo=asdf",
"localhost:5000/library/redis:obj@abcdef?fooo=asdf",
"/docker.io/library/redis:obj@abcdef?fooo=asdf",
"docker.io/library/redis?fooo=asdf",
"sub-dom1.foo.com/bar/baz/quux:latest",
"sub-dom1.foo.com/bar/baz/quux:some-long-tag",
"b.gcr.io/test.example.com/my-app:test.example.com",
"xn--n3h.com/myimage:xn--n3h.com", // ☃.com in punycode
"xn--7o8h.com/myimage:xn--7o8h.com@sha512:fffffff",
"http://xn--7o8h.com/myimage:xn--7o8h.com@sha512:fffffff",
}
b.ReportAllocs()
for i := 0; i < b.N; i++ {
for _, input := range inputs {
_, _ = SplitObject(input)
}
}
}