From ef0630af69980d2d88e6e9767083006bb5eb7621 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Tue, 25 Jun 2013 14:33:07 -0700 Subject: [PATCH] fix typo in IssueComment and return more API error data --- github/github.go | 4 ++-- github/issues.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/github/github.go b/github/github.go index 6e80b47..49f218c 100644 --- a/github/github.go +++ b/github/github.go @@ -173,9 +173,9 @@ type ErrorResponse struct { } func (r *ErrorResponse) Error() string { - return fmt.Sprintf("%v %v: %d %v", + return fmt.Sprintf("%v %v: %d %v %+v", r.Response.Request.Method, r.Response.Request.URL, - r.Response.StatusCode, r.Message) + r.Response.StatusCode, r.Message, r.Errors) } /* diff --git a/github/issues.go b/github/issues.go index 89a2f85..758e27d 100644 --- a/github/issues.go +++ b/github/issues.go @@ -40,7 +40,7 @@ type Issue struct { // IssueComment represents a comment left on an issue. type IssueComment struct { ID int `json:"id,omitempty"` - Body string `json:"body:omitempty"` + Body string `json:"body,omitempty"` User *User `json:"user,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"`