Merge pull request #201 from AGWA-forks/master

Remove unused non-exported function so we can eliminate a dependency
This commit is contained in:
Eddie Zaneski 2019-02-04 11:47:43 -07:00 committed by GitHub
commit 78767ea80f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 20 deletions

20
godo.go
View File

@ -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 != "" {