Merge pull request #201 from AGWA-forks/master
Remove unused non-exported function so we can eliminate a dependency
This commit is contained in:
commit
78767ea80f
20
godo.go
20
godo.go
|
@ -14,7 +14,6 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/google/go-querystring/query"
|
||||
headerLink "github.com/tent/http-link-go"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -263,25 +262,6 @@ func newResponse(r *http.Response) *Response {
|
|||
return &response
|
||||
}
|
||||
|
||||
func (r *Response) links() (map[string]headerLink.Link, error) {
|
||||
if linkText, ok := r.Response.Header["Link"]; ok {
|
||||
links, err := headerLink.Parse(linkText[0])
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
linkMap := map[string]headerLink.Link{}
|
||||
for _, link := range links {
|
||||
linkMap[link.Rel] = link
|
||||
}
|
||||
|
||||
return linkMap, nil
|
||||
}
|
||||
|
||||
return map[string]headerLink.Link{}, nil
|
||||
}
|
||||
|
||||
// populateRate parses the rate related headers and populates the response Rate.
|
||||
func (r *Response) populateRate() {
|
||||
if limit := r.Header.Get(headerRateLimit); limit != "" {
|
||||
|
|
Loading…
Reference in New Issue