diff options
author | Unknwon <u@gogs.io> | 2017-04-04 19:29:59 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-04 19:29:59 -0400 |
commit | d05395fe906dad7741201faa69a54fef538deda9 (patch) | |
tree | 11dae6c5c9b40b8ce85c7294bd0309c03cb1199e /routers/api | |
parent | 37b10666dea98cebf75d0c6f11ee87211ef94703 (diff) |
Refactoring: rename modules -> pkg
Reasons to change:
1. Shorter than 'modules'
2. More generally used by other Go projects
3. Corresponds to the naming of '$GOPATH/pkg' directory
Diffstat (limited to 'routers/api')
26 files changed, 36 insertions, 36 deletions
diff --git a/routers/api/v1/admin/org.go b/routers/api/v1/admin/org.go index e82fc3ed..f5c4a95c 100644 --- a/routers/api/v1/admin/org.go +++ b/routers/api/v1/admin/org.go @@ -8,7 +8,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/routers/api/v1/convert" "github.com/gogits/gogs/routers/api/v1/user" ) diff --git a/routers/api/v1/admin/org_repo.go b/routers/api/v1/admin/org_repo.go index 050f4577..02ff35ba 100644 --- a/routers/api/v1/admin/org_repo.go +++ b/routers/api/v1/admin/org_repo.go @@ -7,7 +7,7 @@ package admin import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" ) func GetRepositoryByParams(ctx *context.APIContext) *models.Repository { diff --git a/routers/api/v1/admin/org_team.go b/routers/api/v1/admin/org_team.go index c0f3487e..dfed0c86 100644 --- a/routers/api/v1/admin/org_team.go +++ b/routers/api/v1/admin/org_team.go @@ -8,7 +8,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/routers/api/v1/convert" "github.com/gogits/gogs/routers/api/v1/user" ) diff --git a/routers/api/v1/admin/repo.go b/routers/api/v1/admin/repo.go index 0f0c3862..8b199937 100644 --- a/routers/api/v1/admin/repo.go +++ b/routers/api/v1/admin/repo.go @@ -7,7 +7,7 @@ package admin import ( api "github.com/gogits/go-gogs-client" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/routers/api/v1/repo" "github.com/gogits/gogs/routers/api/v1/user" ) diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index 3a3c206d..7565ab2c 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -10,9 +10,9 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/mailer" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers/api/v1/user" ) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 3e83c559..d4aa8aee 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -14,8 +14,8 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" "github.com/gogits/gogs/routers/api/v1/admin" "github.com/gogits/gogs/routers/api/v1/misc" "github.com/gogits/gogs/routers/api/v1/org" diff --git a/routers/api/v1/convert/utils.go b/routers/api/v1/convert/utils.go index f34fb3d2..d0beab3d 100644 --- a/routers/api/v1/convert/utils.go +++ b/routers/api/v1/convert/utils.go @@ -5,7 +5,7 @@ package convert import ( - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) // ToCorrectPageSize makes sure page size is in allowed range. diff --git a/routers/api/v1/misc/markdown.go b/routers/api/v1/misc/markdown.go index 4ef0ddf1..d4419d57 100644 --- a/routers/api/v1/misc/markdown.go +++ b/routers/api/v1/misc/markdown.go @@ -7,8 +7,8 @@ package misc import ( api "github.com/gogits/go-gogs-client" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/markup" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/markup" ) // https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-an-arbitrary-markdown-document diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index 7b2cfcd1..3b3576a7 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -8,7 +8,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/routers/api/v1/convert" "github.com/gogits/gogs/routers/api/v1/user" ) diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index 70f8d842..8b0f4008 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -7,7 +7,7 @@ package org import ( api "github.com/gogits/go-gogs-client" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/routers/api/v1/convert" ) diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go index 1d60b7d1..df950040 100644 --- a/routers/api/v1/repo/branch.go +++ b/routers/api/v1/repo/branch.go @@ -8,7 +8,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/routers/api/v1/convert" ) diff --git a/routers/api/v1/repo/collaborators.go b/routers/api/v1/repo/collaborators.go index c3af5bbc..ff109be5 100644 --- a/routers/api/v1/repo/collaborators.go +++ b/routers/api/v1/repo/collaborators.go @@ -9,7 +9,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" ) func ListCollaborators(ctx *context.APIContext) { diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go index 5da91d9e..81c399f6 100644 --- a/routers/api/v1/repo/file.go +++ b/routers/api/v1/repo/file.go @@ -8,7 +8,7 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/routers/repo" ) diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go index 1fcd8735..6a4ec85f 100644 --- a/routers/api/v1/repo/hook.go +++ b/routers/api/v1/repo/hook.go @@ -13,7 +13,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/routers/api/v1/convert" ) diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index ffb52b9c..5e233a20 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -12,8 +12,8 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) func listIssues(ctx *context.APIContext, opts *models.IssuesOptions) { diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go index 4934302f..04ecd216 100644 --- a/routers/api/v1/repo/issue_comment.go +++ b/routers/api/v1/repo/issue_comment.go @@ -9,7 +9,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" ) func ListIssueComments(ctx *context.APIContext) { diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go index dec64f41..06c52dc5 100644 --- a/routers/api/v1/repo/issue_label.go +++ b/routers/api/v1/repo/issue_label.go @@ -9,7 +9,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" ) func ListIssueLabels(ctx *context.APIContext) { diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go index 563dac26..df1a8bb8 100644 --- a/routers/api/v1/repo/key.go +++ b/routers/api/v1/repo/key.go @@ -10,8 +10,8 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers/api/v1/convert" ) diff --git a/routers/api/v1/repo/label.go b/routers/api/v1/repo/label.go index 981eaef1..32c1924b 100644 --- a/routers/api/v1/repo/label.go +++ b/routers/api/v1/repo/label.go @@ -8,7 +8,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" ) func ListLabels(ctx *context.APIContext) { diff --git a/routers/api/v1/repo/milestone.go b/routers/api/v1/repo/milestone.go index bd408f63..5133d19b 100644 --- a/routers/api/v1/repo/milestone.go +++ b/routers/api/v1/repo/milestone.go @@ -10,7 +10,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" ) func ListMilestones(ctx *context.APIContext) { diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 326ff25e..d7109f78 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -13,9 +13,9 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers/api/v1/convert" ) diff --git a/routers/api/v1/user/app.go b/routers/api/v1/user/app.go index 165f6eb8..ebba7f09 100644 --- a/routers/api/v1/user/app.go +++ b/routers/api/v1/user/app.go @@ -8,7 +8,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" ) // https://github.com/gogits/go-gogs-client/wiki/Users#list-access-tokens-for-a-user diff --git a/routers/api/v1/user/email.go b/routers/api/v1/user/email.go index 168f383a..c8b4ce1b 100644 --- a/routers/api/v1/user/email.go +++ b/routers/api/v1/user/email.go @@ -8,8 +8,8 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers/api/v1/convert" ) diff --git a/routers/api/v1/user/follower.go b/routers/api/v1/user/follower.go index 58a16244..814f10f4 100644 --- a/routers/api/v1/user/follower.go +++ b/routers/api/v1/user/follower.go @@ -8,7 +8,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" ) func responseApiUsers(ctx *context.APIContext, users []*models.User) { diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go index 941cfb60..22df7548 100644 --- a/routers/api/v1/user/key.go +++ b/routers/api/v1/user/key.go @@ -9,8 +9,8 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers/api/v1/convert" "github.com/gogits/gogs/routers/api/v1/repo" ) diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index b1f06ec7..d797c650 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -11,7 +11,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/context" ) func Search(ctx *context.APIContext) { |