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

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/[email protected]/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 [email protected]

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

Signed-off-by: zhangguanzhang <[email protected]>
@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