aboutsummaryrefslogtreecommitdiff
path: root/provider.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-01-05 17:16:19 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-01-05 17:16:19 +0100
commit2cf18f38fa97ba8b4524170960dff68b2a83ceec (patch)
treedef946fa5e30afcbf8a514a802fbe2816b0e0103 /provider.go
parent0c949602178b96ff42f95243074d851ac778b329 (diff)
Bikeshadding
Diffstat (limited to 'provider.go')
-rw-r--r--provider.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/provider.go b/provider.go
index 8ae4f0e..af21b26 100644
--- a/provider.go
+++ b/provider.go
@@ -95,7 +95,7 @@ func (p *Provider) post(uri string, s Signer, v interface{}) (*http.Response, er
switch resp.Header.Get("Content-Type") {
case "application/problem+json":
defer resp.Body.Close()
- return resp, parseProblem(resp)
+ return resp, problem(resp)
case "application/json":
defer resp.Body.Close()
return resp, json.NewDecoder(resp.Body).Decode(v)
@@ -116,7 +116,7 @@ func (p *Provider) get(uri string, v interface{}) (*http.Response, error) {
return resp, json.NewDecoder(resp.Body).Decode(v)
}
-func parseProblem(resp *http.Response) error {
+func problem(resp *http.Response) error {
var p Problem
if err := json.NewDecoder(resp.Body).Decode(&p); err != nil {
return err