Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

support registry:2.7 +, fix https://github.com/heroku/docker-registry-client/issues/82 #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhangguanzhang
Copy link

@zhangguanzhang zhangguanzhang commented Nov 8, 2021

Fixes: #82

(dlv) s
> github.com/heroku/docker-registry-client/registry.getNextLink() /root/go/pkg/mod/github.com/heroku/docker-registry-client@v0.0.0-20211012143308-9463674c8930/registry/json.go:44 (PC: 0x17e0826)
    39:	// `rel="next"` may not have quoted values in the wild.
    40:	var nextLinkRE = regexp.MustCompile(`^ *<?([^;>]+)>? *(?:;[^;]*)*; *rel="?next"?(?:;.*)?`)
    41:	
    42:	func getNextLink(resp *http.Response) (string, error) {
    43:		for _, link := range resp.Header[http.CanonicalHeaderKey("Link")] {
=>  44:			parts := nextLinkRE.FindStringSubmatch(link)
    45:			if parts != nil {
    46:				return parts[1], nil
    47:			}
    48:		}
    49:		return "", ErrNoMorePages
(dlv) p link
"</v2/_catalog?last=wps%2Fkdocs-kat-migrate&n=100>; rel=\"next\""

Signed-off-by: zhangguanzhang zhangguanzhang@qq.com

    </v2/_catalog?n=5&last=tag5>; type="application/json"; rel="next"

Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
@zhangguanzhang
Copy link
Author

@zhangguanzhang
Copy link
Author

@agnaite @beanieboi @brendangatens @chadian @crawfoal
any one still maintained?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hub.Repositories() return s error if there are more repository than fetched per page
1 participant