func (c githubContainerRegistry) Ping() error {
	if !c.repoDetails.IsPrivate() {
		// V2 API does not support - ping without credential.
		return nil
	}
	url := c.url("/")
	if !strings.HasSuffix(url, "/") {
		// github v2 root endpoint requires the trailing slash(otherwise 404 returns).
		url += "/"
	}
	logger.Debugf("github ping %q", url)
	resp, err := c.client.Get(url)
	if resp != nil {
		defer resp.Body.Close()
	}
	return unwrapNetError(err)
}
// Ping pings the github endpoint.
Ping pings the github endpoint.
// Ping pings the github endpoint .
func (c githubContainerRegistry) Ping() error {
	if !c.repoDetails.IsPrivate() {
		return nil
	}
	url := c.url("/")
	if !strings.HasSuffix(url, "/") {
		url += "/"
	}
	logger.Debugf("github ping %q", url)
	resp, err := c.client.Get(url)
	if resp != nil {
		defer resp.Body.Close()
	}
	return unwrapNetError(err)
}
func ( c githubContainerRegistry ) Ping ( ) error { if ! c . repoDetails . IsPrivate ( ) { return nil } url := c . url ( " " ) if ! strings . HasSuffix ( url , " " ) { url += " " } logger . Debugf ( " " , url ) resp , err := c . client . Get ( url ) if resp != nil { defer resp . Body . Close ( ) } return unwrapNetError ( err ) }
Ping pings the github endpoint.
Ping pings the github endpoint .
// V2 API does not support - ping without credential. // github v2 root endpoint requires the trailing slash(otherwise 404 returns).