MCPcopy Create free account
hub / github.com/cli/cli / findNextPage

Function findNextPage

pkg/cmd/run/shared/artifacts.go:87–94  ·  view source on GitHub ↗
(resp *http.Response)

Source from the content-addressed store, hash-verified

85var linkRE = regexp.MustCompile(`<([^>]+)>;\s*rel="([^"]+)"`)
86
87func findNextPage(resp *http.Response) string {
88 for _, m := range linkRE.FindAllStringSubmatch(resp.Header.Get("Link"), -1) {
89 if len(m) > 2 && m[2] == "next" {
90 return m[1]
91 }
92 }
93 return ""
94}

Callers 1

apiGetFunction · 0.70

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected