Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Commit a184f2d

Browse files
vtemianlafriks
authored andcommitted
Run go fmt for the entire project (#85)
1 parent 7296e60 commit a184f2d

16 files changed

+101
-101
lines changed

gitea/admin_user.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// CreateUserOption create user options
1414
type CreateUserOption struct {
15-
SourceID int64 `json:"source_id"`
15+
SourceID int64 `json:"source_id"`
1616
LoginName string `json:"login_name"`
1717
// required: true
1818
Username string `json:"username" binding:"Required;AlphaDashDot;MaxSize(35)"`
@@ -21,8 +21,8 @@ type CreateUserOption struct {
2121
// swagger:strfmt email
2222
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
2323
// required: true
24-
Password string `json:"password" binding:"Required;MaxSize(255)"`
25-
SendNotify bool `json:"send_notify"`
24+
Password string `json:"password" binding:"Required;MaxSize(255)"`
25+
SendNotify bool `json:"send_notify"`
2626
}
2727

2828
// AdminCreateUser create a user
@@ -37,20 +37,20 @@ func (c *Client) AdminCreateUser(opt CreateUserOption) (*User, error) {
3737

3838
// EditUserOption edit user options
3939
type EditUserOption struct {
40-
SourceID int64 `json:"source_id"`
40+
SourceID int64 `json:"source_id"`
4141
LoginName string `json:"login_name"`
42-
FullName string `json:"full_name" binding:"MaxSize(100)"`
42+
FullName string `json:"full_name" binding:"MaxSize(100)"`
4343
// required: true
4444
// swagger:strfmt email
45-
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
46-
Password string `json:"password" binding:"MaxSize(255)"`
47-
Website string `json:"website" binding:"MaxSize(50)"`
48-
Location string `json:"location" binding:"MaxSize(50)"`
49-
Active *bool `json:"active"`
50-
Admin *bool `json:"admin"`
51-
AllowGitHook *bool `json:"allow_git_hook"`
52-
AllowImportLocal *bool `json:"allow_import_local"`
53-
MaxRepoCreation *int `json:"max_repo_creation"`
45+
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
46+
Password string `json:"password" binding:"MaxSize(255)"`
47+
Website string `json:"website" binding:"MaxSize(50)"`
48+
Location string `json:"location" binding:"MaxSize(50)"`
49+
Active *bool `json:"active"`
50+
Admin *bool `json:"admin"`
51+
AllowGitHook *bool `json:"allow_git_hook"`
52+
AllowImportLocal *bool `json:"allow_import_local"`
53+
MaxRepoCreation *int `json:"max_repo_creation"`
5454
}
5555

5656
// AdminEditUser modify user informations

gitea/hook.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ var (
2121

2222
// Hook a hook is a web hook when one repository changed
2323
type Hook struct {
24-
ID int64 `json:"id"`
25-
Type string `json:"type"`
26-
URL string `json:"-"`
27-
Config map[string]string `json:"config"`
28-
Events []string `json:"events"`
29-
Active bool `json:"active"`
24+
ID int64 `json:"id"`
25+
Type string `json:"type"`
26+
URL string `json:"-"`
27+
Config map[string]string `json:"config"`
28+
Events []string `json:"events"`
29+
Active bool `json:"active"`
3030
// swagger:strfmt date-time
31-
Updated time.Time `json:"updated_at"`
31+
Updated time.Time `json:"updated_at"`
3232
// swagger:strfmt date-time
33-
Created time.Time `json:"created_at"`
33+
Created time.Time `json:"created_at"`
3434
}
3535

3636
// HookList represents a list of API hook.
@@ -67,7 +67,7 @@ type CreateHookOption struct {
6767
Type string `json:"type" binding:"Required"`
6868
// required: true
6969
Config map[string]string `json:"config" binding:"Required"`
70-
Events []string `json:"events"`
70+
Events []string `json:"events"`
7171
// default: false
7272
Active bool `json:"active"`
7373
}
@@ -95,8 +95,8 @@ func (c *Client) CreateRepoHook(user, repo string, opt CreateHookOption) (*Hook,
9595
// EditHookOption options when modify one hook
9696
type EditHookOption struct {
9797
Config map[string]string `json:"config"`
98-
Events []string `json:"events"`
99-
Active *bool `json:"active"`
98+
Events []string `json:"events"`
99+
Active *bool `json:"active"`
100100
}
101101

102102
// EditOrgHook modify one hook of an organization, with hook id and options
@@ -140,7 +140,7 @@ type Payloader interface {
140140
// PayloadUser represents the author or committer of a commit
141141
type PayloadUser struct {
142142
// Full name of the commit author
143-
Name string `json:"name"`
143+
Name string `json:"name"`
144144
// swagger:strfmt email
145145
Email string `json:"email"`
146146
UserName string `json:"username"`
@@ -159,7 +159,7 @@ type PayloadCommit struct {
159159
Committer *PayloadUser `json:"committer"`
160160
Verification *PayloadCommitVerification `json:"verification"`
161161
// swagger:strfmt date-time
162-
Timestamp time.Time `json:"timestamp"`
162+
Timestamp time.Time `json:"timestamp"`
163163
}
164164

165165
// PayloadCommitVerification represents the GPG verification of a commit

gitea/issue.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ type Issue struct {
4343
//
4444
// type: string
4545
// enum: open,closed
46-
State StateType `json:"state"`
47-
Comments int `json:"comments"`
46+
State StateType `json:"state"`
47+
Comments int `json:"comments"`
4848
// swagger:strfmt date-time
49-
Created time.Time `json:"created_at"`
49+
Created time.Time `json:"created_at"`
5050
// swagger:strfmt date-time
51-
Updated time.Time `json:"updated_at"`
51+
Updated time.Time `json:"updated_at"`
5252

5353
PullRequest *PullRequestMeta `json:"pull_request"`
5454
}
@@ -86,15 +86,15 @@ func (c *Client) GetIssue(owner, repo string, index int64) (*Issue, error) {
8686
// CreateIssueOption options to create one issue
8787
type CreateIssueOption struct {
8888
// required:true
89-
Title string `json:"title" binding:"Required"`
90-
Body string `json:"body"`
89+
Title string `json:"title" binding:"Required"`
90+
Body string `json:"body"`
9191
// username of assignee
92-
Assignee string `json:"assignee"`
92+
Assignee string `json:"assignee"`
9393
// milestone id
94-
Milestone int64 `json:"milestone"`
94+
Milestone int64 `json:"milestone"`
9595
// list of label ids
96-
Labels []int64 `json:"labels"`
97-
Closed bool `json:"closed"`
96+
Labels []int64 `json:"labels"`
97+
Closed bool `json:"closed"`
9898
}
9999

100100
// CreateIssue create a new issue for a given repository

gitea/issue_comment.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ import (
1313

1414
// Comment represents a comment on a commit or issue
1515
type Comment struct {
16-
ID int64 `json:"id"`
17-
HTMLURL string `json:"html_url"`
18-
PRURL string `json:"pull_request_url"`
19-
IssueURL string `json:"issue_url"`
20-
Poster *User `json:"user"`
21-
Body string `json:"body"`
16+
ID int64 `json:"id"`
17+
HTMLURL string `json:"html_url"`
18+
PRURL string `json:"pull_request_url"`
19+
IssueURL string `json:"issue_url"`
20+
Poster *User `json:"user"`
21+
Body string `json:"body"`
2222
// swagger:strfmt date-time
23-
Created time.Time `json:"created_at"`
23+
Created time.Time `json:"created_at"`
2424
// swagger:strfmt date-time
25-
Updated time.Time `json:"updated_at"`
25+
Updated time.Time `json:"updated_at"`
2626
}
2727

2828
// ListIssueComments list comments on an issue.

gitea/issue_label.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
// Label a label to an issue or a pr
1414
// swagger:model
1515
type Label struct {
16-
ID int64 `json:"id"`
17-
Name string `json:"name"`
16+
ID int64 `json:"id"`
17+
Name string `json:"name"`
1818
// example: 00aabb
1919
Color string `json:"color"`
2020
URL string `json:"url"`
@@ -36,7 +36,7 @@ func (c *Client) GetRepoLabel(owner, repo string, id int64) (*Label, error) {
3636
// CreateLabelOption options for creating a label
3737
type CreateLabelOption struct {
3838
// required:true
39-
Name string `json:"name" binding:"Required"`
39+
Name string `json:"name" binding:"Required"`
4040
// required:true
4141
// example: #00aabb
4242
Color string `json:"color" binding:"Required;Size(7)"`

gitea/issue_milestone.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ import (
1313

1414
// Milestone milestone is a collection of issues on one repository
1515
type Milestone struct {
16-
ID int64 `json:"id"`
17-
Title string `json:"title"`
18-
Description string `json:"description"`
19-
State StateType `json:"state"`
20-
OpenIssues int `json:"open_issues"`
21-
ClosedIssues int `json:"closed_issues"`
16+
ID int64 `json:"id"`
17+
Title string `json:"title"`
18+
Description string `json:"description"`
19+
State StateType `json:"state"`
20+
OpenIssues int `json:"open_issues"`
21+
ClosedIssues int `json:"closed_issues"`
2222
// swagger:strfmt date-time
23-
Closed *time.Time `json:"closed_at"`
23+
Closed *time.Time `json:"closed_at"`
2424
// swagger:strfmt date-time
25-
Deadline *time.Time `json:"due_on"`
25+
Deadline *time.Time `json:"due_on"`
2626
}
2727

2828
// ListRepoMilestones list all the milestones of one repository
@@ -39,10 +39,10 @@ func (c *Client) GetMilestone(owner, repo string, id int64) (*Milestone, error)
3939

4040
// CreateMilestoneOption options for creating a milestone
4141
type CreateMilestoneOption struct {
42-
Title string `json:"title"`
43-
Description string `json:"description"`
42+
Title string `json:"title"`
43+
Description string `json:"description"`
4444
// swagger:strfmt date-time
45-
Deadline *time.Time `json:"due_on"`
45+
Deadline *time.Time `json:"due_on"`
4646
}
4747

4848
// CreateMilestone create one milestone with options

gitea/issue_tracked_time.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
// TrackedTime worked time for an issue / pr
1515
type TrackedTime struct {
16-
ID int64 `json:"id"`
16+
ID int64 `json:"id"`
1717
// swagger:strfmt date-time
1818
Created time.Time `json:"created"`
1919
// Time in seconds

gitea/org.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ func (c *Client) GetOrg(orgname string) (*Organization, error) {
4242
// CreateOrgOption options for creating an organization
4343
type CreateOrgOption struct {
4444
// required: true
45-
UserName string `json:"username" binding:"Required"`
46-
FullName string `json:"full_name"`
45+
UserName string `json:"username" binding:"Required"`
46+
FullName string `json:"full_name"`
4747
Description string `json:"description"`
48-
Website string `json:"website"`
49-
Location string `json:"location"`
48+
Website string `json:"website"`
49+
Location string `json:"location"`
5050
}
5151

5252
// EditOrgOption options for editing an organization

gitea/org_team.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type Team struct {
1010
Name string `json:"name"`
1111
Description string `json:"description"`
1212
// enum: none,read,write,admin,owner
13-
Permission string `json:"permission"`
13+
Permission string `json:"permission"`
1414
}
1515

1616
// CreateTeamOption options for creating a team
@@ -19,7 +19,7 @@ type CreateTeamOption struct {
1919
Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(30)"`
2020
Description string `json:"description" binding:"MaxSize(255)"`
2121
// enum: read,write,admin
22-
Permission string `json:"permission"`
22+
Permission string `json:"permission"`
2323
}
2424

2525
// EditTeamOption options for editing a team
@@ -28,5 +28,5 @@ type EditTeamOption struct {
2828
Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(30)"`
2929
Description string `json:"description" binding:"MaxSize(255)"`
3030
// enum: read,write,admin
31-
Permission string `json:"permission"`
31+
Permission string `json:"permission"`
3232
}

gitea/pull.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ type PullRequest struct {
2929
DiffURL string `json:"diff_url"`
3030
PatchURL string `json:"patch_url"`
3131

32-
Mergeable bool `json:"mergeable"`
33-
HasMerged bool `json:"merged"`
32+
Mergeable bool `json:"mergeable"`
33+
HasMerged bool `json:"merged"`
3434
// swagger:strfmt date-time
3535
Merged *time.Time `json:"merged_at"`
3636
MergedCommitID *string `json:"merge_commit_sha"`

0 commit comments

Comments
 (0)