func (h *HubService) GetReadTokenWithAuth(repo string, auth Authenticator) (*TokenAuth, error) {
	path := fmt.Sprintf("repositories/%s/images", repo)
	req, err := h.newRequest("GET", path, auth)
	if err != nil {
		return nil, err
	}
	return h.do(req)
}
Retrieves a read-only token from the Docker Hub for the specified private repo.
package registry
import (
	"fmt"
	"net/http"
	"net/url"
)
type HubService struct {
	client *Client
}
func (h *HubService) GetReadToken(repo string) (*TokenAuth, error) {
	path := fmt.Sprintf("repositories/%s/images", repo)
	req, err := h.newRequest("GET", path, NilAuth{})
	if err != nil {
		return nil, err
	}
	return h.do(req)
}