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
32d53f1b
Commit
32d53f1b
authored
Aug 18, 2015
by
Sander van Harmelen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6 from mvdan/patches
Some fixes
parents
70b8c323
4016c5be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
gitlab.go
gitlab.go
+5
-2
projects.go
projects.go
+4
-4
No files found.
gitlab.go
View file @
32d53f1b
...
@@ -123,7 +123,10 @@ func NewClient(httpClient *http.Client, token string) *Client {
...
@@ -123,7 +123,10 @@ func NewClient(httpClient *http.Client, token string) *Client {
}
}
c
:=
&
Client
{
client
:
httpClient
,
token
:
token
,
UserAgent
:
userAgent
}
c
:=
&
Client
{
client
:
httpClient
,
token
:
token
,
UserAgent
:
userAgent
}
c
.
SetBaseURL
(
defaultBaseURL
)
if
err
:=
c
.
SetBaseURL
(
defaultBaseURL
);
err
!=
nil
{
// should never happen since defaultBaseURL is our constant
panic
(
err
)
}
c
.
Branches
=
&
BranchesService
{
client
:
c
}
c
.
Branches
=
&
BranchesService
{
client
:
c
}
c
.
Commits
=
&
CommitsService
{
client
:
c
}
c
.
Commits
=
&
CommitsService
{
client
:
c
}
...
@@ -300,7 +303,7 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
...
@@ -300,7 +303,7 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
if
v
!=
nil
{
if
v
!=
nil
{
if
w
,
ok
:=
v
.
(
io
.
Writer
);
ok
{
if
w
,
ok
:=
v
.
(
io
.
Writer
);
ok
{
io
.
Copy
(
w
,
resp
.
Body
)
_
,
err
=
io
.
Copy
(
w
,
resp
.
Body
)
}
else
{
}
else
{
err
=
json
.
NewDecoder
(
resp
.
Body
)
.
Decode
(
v
)
err
=
json
.
NewDecoder
(
resp
.
Body
)
.
Decode
(
v
)
}
}
...
...
projects.go
View file @
32d53f1b
...
@@ -52,17 +52,17 @@ type Project struct {
...
@@ -52,17 +52,17 @@ type Project struct {
MergeRequestsEnabled
bool
`json:"merge_requests_enabled"`
MergeRequestsEnabled
bool
`json:"merge_requests_enabled"`
WikiEnabled
bool
`json:"wiki_enabled"`
WikiEnabled
bool
`json:"wiki_enabled"`
SnippetsEnabled
bool
`json:"snippets_enabled"`
SnippetsEnabled
bool
`json:"snippets_enabled"`
CreatedAt
string
`json:"created_at"`
CreatedAt
time
.
Time
`json:"created_at"`
LastActivityAt
string
`json:"last_activity_at"`
LastActivityAt
time
.
Time
`json:"last_activity_at"`
CreatorID
int
`json:"creator_id"`
CreatorID
int
`json:"creator_id"`
Namespace
struct
{
Namespace
struct
{
CreatedAt
string
`json:"created_at"`
CreatedAt
time
.
Time
`json:"created_at"`
Description
string
`json:"description"`
Description
string
`json:"description"`
ID
int
`json:"id"`
ID
int
`json:"id"`
Name
string
`json:"name"`
Name
string
`json:"name"`
OwnerID
int
`json:"owner_id"`
OwnerID
int
`json:"owner_id"`
Path
string
`json:"path"`
Path
string
`json:"path"`
UpdatedAt
string
`json:"updated_at"`
UpdatedAt
time
.
Time
`json:"updated_at"`
}
`json:"namespace"`
}
`json:"namespace"`
Archived
bool
`json:"archived"`
Archived
bool
`json:"archived"`
AvatarURL
string
`json:"avatar_url"`
AvatarURL
string
`json:"avatar_url"`
...
...
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