Skip to content

Commit dbc61ce

Browse files
committed
go fmt
1 parent a982fb7 commit dbc61ce

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

cmd/admin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func runRepoSyncReleases(c *cli.Context) error {
353353
PageSize: models.RepositoryListDefaultPageSize,
354354
Page: page,
355355
},
356-
Private: true,
356+
Private: true,
357357
})
358358
if err != nil {
359359
return fmt.Errorf("SearchRepositoryByName: %v", err)

models/repo_list_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func TestSearchRepository(t *testing.T) {
1818
// test search public repository on explore page
1919
repos, count, err := SearchRepositoryByName(&SearchRepoOptions{
2020
ListOptions: ListOptions{
21-
Page: 1,
22-
PageSize: 10,
21+
Page: 1,
22+
PageSize: 10,
2323
},
2424
Keyword: "repo_12",
2525
Collaborate: util.OptionalBoolFalse,
@@ -33,8 +33,8 @@ func TestSearchRepository(t *testing.T) {
3333

3434
repos, count, err = SearchRepositoryByName(&SearchRepoOptions{
3535
ListOptions: ListOptions{
36-
Page: 1,
37-
PageSize: 10,
36+
Page: 1,
37+
PageSize: 10,
3838
},
3939
Keyword: "test_repo",
4040
Collaborate: util.OptionalBoolFalse,
@@ -47,8 +47,8 @@ func TestSearchRepository(t *testing.T) {
4747
// test search private repository on explore page
4848
repos, count, err = SearchRepositoryByName(&SearchRepoOptions{
4949
ListOptions: ListOptions{
50-
Page: 1,
51-
PageSize: 10,
50+
Page: 1,
51+
PageSize: 10,
5252
},
5353
Keyword: "repo_13",
5454
Private: true,
@@ -63,8 +63,8 @@ func TestSearchRepository(t *testing.T) {
6363

6464
repos, count, err = SearchRepositoryByName(&SearchRepoOptions{
6565
ListOptions: ListOptions{
66-
Page: 1,
67-
PageSize: 10,
66+
Page: 1,
67+
PageSize: 10,
6868
},
6969
Keyword: "test_repo",
7070
Private: true,
@@ -85,8 +85,8 @@ func TestSearchRepository(t *testing.T) {
8585
// Test search within description
8686
repos, count, err = SearchRepository(&SearchRepoOptions{
8787
ListOptions: ListOptions{
88-
Page: 1,
89-
PageSize: 10,
88+
Page: 1,
89+
PageSize: 10,
9090
},
9191
Keyword: "description_14",
9292
Collaborate: util.OptionalBoolFalse,
@@ -102,8 +102,8 @@ func TestSearchRepository(t *testing.T) {
102102
// Test NOT search within description
103103
repos, count, err = SearchRepository(&SearchRepoOptions{
104104
ListOptions: ListOptions{
105-
Page: 1,
106-
PageSize: 10,
105+
Page: 1,
106+
PageSize: 10,
107107
},
108108
Keyword: "description_14",
109109
Collaborate: util.OptionalBoolFalse,

routers/api/v1/admin/org.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ func GetAllOrgs(ctx *context.APIContext) {
100100
// "$ref": "#/responses/forbidden"
101101

102102
users, _, err := models.SearchUsers(&models.SearchUserOptions{
103-
Type: models.UserTypeOrganization,
104-
OrderBy: models.SearchOrderByAlphabetically,
103+
Type: models.UserTypeOrganization,
104+
OrderBy: models.SearchOrderByAlphabetically,
105105
ListOptions: models.ListOptions{
106106
Page: ctx.QueryInt("page"),
107107
PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
108108
},
109-
Private: true,
109+
Private: true,
110110
})
111111
if err != nil {
112112
ctx.Error(http.StatusInternalServerError, "SearchOrganizations", err)

routers/api/v1/repo/issue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ func SearchIssues(ctx *context.APIContext) {
133133
if len(keyword) == 0 || len(issueIDs) > 0 || len(labelIDs) > 0 {
134134
issues, err = models.Issues(&models.IssuesOptions{
135135
ListOptions: models.ListOptions{
136-
Page: ctx.QueryInt("page"),
137-
PageSize: setting.UI.IssuePagingNum,
136+
Page: ctx.QueryInt("page"),
137+
PageSize: setting.UI.IssuePagingNum,
138138
},
139139
RepoIDs: repoIDs,
140140
IsClosed: isClosed,

routers/api/v1/repo/repo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ func Search(ctx *context.APIContext) {
127127

128128
opts := &models.SearchRepoOptions{
129129
ListOptions: models.ListOptions{
130-
Page: ctx.QueryInt("page"),
131-
PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
130+
Page: ctx.QueryInt("page"),
131+
PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
132132
},
133133
Keyword: strings.Trim(ctx.Query("q"), " "),
134134
OwnerID: ctx.QueryInt64("uid"),

0 commit comments

Comments
 (0)