This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Description
when use http protocol to connect https registry,it will return 302 response.
here would better check statuscode and raise Error
|
func (r *Registry) Ping() error { |
|
url := r.url("/v2/") |
|
r.Logf("registry.ping url=%s", url) |
|
resp, err := r.Client.Get(url) |
|
if resp != nil { |
|
defer resp.Body.Close() |
|
} |
|
return err |
|
} |