I am doing an http requestlike this one:
resp, err := http.Get("http://example.com/")
Then I am getting the header link:
link := resp.Header.Get("link")
Which gives me a result like this:
<page=3>; rel="next",<page=1>; rel="prev";<page=5>; rel="last"
Question
How can I parse this into a more legible way? I specifically trying to get the last page but firstand nextpage should useful as well.
I tried with Splitsand Regular expressionswithout success.