Commit Graph

4 Commits

Author SHA1 Message Date
Flavian Missi d9470ef938 test distribution challenge error handling
Signed-off-by: Flavian Missi <fmissi@redhat.com>
2024-11-18 10:40:03 +01:00
Miloslav Trmač 65ffc9d827 Use bytes.NewReader instead of bytes.NewBufferString
We only want a Reader, so be more precise.

More importantly, we want to remove all instances of the habit to use
bytes.NewBuffer instead of bytes.NewReader (which can actually be unsafe),
although that concern does not directly apply to these calls

Should not change (test) behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-17 23:57:42 +02:00
Miloslav Trmač adafbea5b9 Use io.NopCloser instead of a copy
Should not change (test) behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-17 23:57:33 +02:00
Paul Holzinger 49113724f1
Remove github.com/docker/distribution/registry/client package
Using the github.com/docker/distribution/registry/client package will
import many huge prometheus dependencies, e.g.
 * github.com/prometheus/client_golang/prometheus/promhttp
 * github.com/prometheus/client_golang/prometheus
 * github.com/prometheus/procfs
and even more...

All of these dependencies are completely unused AFAICT but will still end
up in a binary because they are imported transitive.

github.com/docker/distribution/registry/client is only used to check
http errors so I think it makes sense to copy only the required code
into the docker package.

I vendored this commit into podman and it saves over 700KB in binary
size.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-09-06 18:40:49 +02:00