Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
579344d7
Commit
579344d7
authored
Nov 23, 2015
by
Martin Sefcik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic changes
parent
48a4b33a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
gitlab.go
gitlab.go
+2
-2
gitlab_test.go
gitlab_test.go
+5
-5
No files found.
gitlab.go
View file @
579344d7
...
@@ -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
)
}
}
...
...
gitlab_test.go
View file @
579344d7
...
@@ -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
!=
wa
nt
{
if
c
.
UserAgent
!=
userAge
nt
{
t
.
Errorf
(
"NewClient UserAgent is %
v, want %v"
,
got
,
wa
nt
)
t
.
Errorf
(
"NewClient UserAgent is %
s, want %s"
,
c
.
UserAgent
,
userAge
nt
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment