Commit 579344d7 authored by Martin Sefcik's avatar Martin Sefcik

Cosmetic changes

parent 48a4b33a
...@@ -350,8 +350,8 @@ type ErrorResponse struct { ...@@ -350,8 +350,8 @@ type ErrorResponse struct {
} }
func (r *ErrorResponse) Error() string { func (r *ErrorResponse) Error() string {
return fmt.Sprintf("%v %v: %d %v %+v", return fmt.Sprintf("%v %s: %d %v %+v",
r.Response.Request.Method, r.Response.Request.URL, r.Response.Request.Method, r.Response.Request.URL.String(),
r.Response.StatusCode, r.Message, r.Errors) r.Response.StatusCode, r.Message, r.Errors)
} }
......
...@@ -40,7 +40,7 @@ func testUrl(t *testing.T, r *http.Request, want string) { ...@@ -40,7 +40,7 @@ func testUrl(t *testing.T, r *http.Request, want string) {
func testMethod(t *testing.T, r *http.Request, want string) { func testMethod(t *testing.T, r *http.Request, want string) {
if got := r.Method; got != want { if got := r.Method; got != want {
t.Errorf("Request method: %v, want %v", got, want) t.Errorf("Request method: %s, want %s", got, want)
} }
} }
...@@ -82,11 +82,11 @@ func responseBody(w http.ResponseWriter, filename string) { ...@@ -82,11 +82,11 @@ func responseBody(w http.ResponseWriter, filename string) {
func TestNewClient(t *testing.T) { func TestNewClient(t *testing.T) {
c := NewClient(nil, "") c := NewClient(nil, "")
if got, want := c.BaseURL().String(), defaultBaseURL; got != want { if c.BaseURL().String() != defaultBaseURL {
t.Errorf("NewClient BaseURL is %v, want %v", got, want) t.Errorf("NewClient BaseURL is %s, want %s", c.BaseURL().String(), defaultBaseURL)
} }
if got, want := c.UserAgent, userAgent; got != want { if c.UserAgent != userAgent {
t.Errorf("NewClient UserAgent is %v, want %v", got, want) t.Errorf("NewClient UserAgent is %s, want %s", c.UserAgent, userAgent)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment