From 4400d2fdd933204044aeb18ce7d8613c53aa87c0 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 11 Jun 2017 00:34:14 -0400 Subject: [PATCH] Refactoring: rename package routers -> routes --- cmd/hook.go | 2 +- cmd/serv.go | 2 +- cmd/web.go | 30 +++++++++---------- gogs.go | 2 +- {routers => routes}/admin/admin.go | 0 {routers => routes}/admin/auths.go | 0 {routers => routes}/admin/notice.go | 0 {routers => routes}/admin/orgs.go | 4 +-- {routers => routes}/admin/repos.go | 0 {routers => routes}/admin/users.go | 4 +-- {routers => routes}/api/v1/admin/org.go | 4 +-- {routers => routes}/api/v1/admin/org_repo.go | 0 {routers => routes}/api/v1/admin/org_team.go | 4 +-- {routers => routes}/api/v1/admin/repo.go | 4 +-- {routers => routes}/api/v1/admin/user.go | 2 +- {routers => routes}/api/v1/api.go | 10 +++---- {routers => routes}/api/v1/convert/convert.go | 0 {routers => routes}/api/v1/convert/utils.go | 0 {routers => routes}/api/v1/misc/markdown.go | 0 {routers => routes}/api/v1/org/org.go | 4 +-- {routers => routes}/api/v1/org/team.go | 2 +- {routers => routes}/api/v1/repo/branch.go | 2 +- .../api/v1/repo/collaborators.go | 0 {routers => routes}/api/v1/repo/file.go | 2 +- {routers => routes}/api/v1/repo/hook.go | 2 +- {routers => routes}/api/v1/repo/issue.go | 0 .../api/v1/repo/issue_comment.go | 0 .../api/v1/repo/issue_label.go | 0 {routers => routes}/api/v1/repo/key.go | 2 +- {routers => routes}/api/v1/repo/label.go | 0 {routers => routes}/api/v1/repo/milestone.go | 0 {routers => routes}/api/v1/repo/repo.go | 2 +- {routers => routes}/api/v1/user/app.go | 0 {routers => routes}/api/v1/user/email.go | 2 +- {routers => routes}/api/v1/user/follower.go | 0 {routers => routes}/api/v1/user/key.go | 4 +-- {routers => routes}/api/v1/user/user.go | 0 {routers => routes}/dev/template.go | 0 {routers => routes}/home.go | 4 +-- {routers => routes}/install.go | 2 +- {routers => routes}/org/members.go | 0 {routers => routes}/org/org.go | 0 {routers => routes}/org/setting.go | 2 +- {routers => routes}/org/teams.go | 0 {routers => routes}/repo/branch.go | 0 {routers => routes}/repo/commit.go | 0 {routers => routes}/repo/download.go | 0 {routers => routes}/repo/editor.go | 0 {routers => routes}/repo/http.go | 0 {routers => routes}/repo/issue.go | 0 {routers => routes}/repo/pull.go | 0 {routers => routes}/repo/release.go | 0 {routers => routes}/repo/repo.go | 0 {routers => routes}/repo/setting.go | 0 {routers => routes}/repo/view.go | 0 {routers => routes}/repo/webhook.go | 0 {routers => routes}/repo/wiki.go | 0 {routers => routes}/user/auth.go | 0 {routers => routes}/user/home.go | 0 {routers => routes}/user/profile.go | 2 +- {routers => routes}/user/setting.go | 0 templates/.VERSION | 2 +- 62 files changed, 51 insertions(+), 51 deletions(-) rename {routers => routes}/admin/admin.go (100%) rename {routers => routes}/admin/auths.go (100%) rename {routers => routes}/admin/notice.go (100%) rename {routers => routes}/admin/orgs.go (88%) rename {routers => routes}/admin/repos.go (100%) rename {routers => routes}/admin/users.go (98%) rename {routers => routes}/api/v1/admin/org.go (92%) rename {routers => routes}/api/v1/admin/org_repo.go (100%) rename {routers => routes}/api/v1/admin/org_team.go (92%) rename {routers => routes}/api/v1/admin/repo.go (85%) rename {routers => routes}/api/v1/admin/user.go (98%) rename {routers => routes}/api/v1/api.go (97%) rename {routers => routes}/api/v1/convert/convert.go (100%) rename {routers => routes}/api/v1/convert/utils.go (100%) rename {routers => routes}/api/v1/misc/markdown.go (100%) rename {routers => routes}/api/v1/org/org.go (94%) rename {routers => routes}/api/v1/org/team.go (92%) rename {routers => routes}/api/v1/repo/branch.go (96%) rename {routers => routes}/api/v1/repo/collaborators.go (100%) rename {routers => routes}/api/v1/repo/file.go (97%) rename {routers => routes}/api/v1/repo/hook.go (99%) rename {routers => routes}/api/v1/repo/issue.go (100%) rename {routers => routes}/api/v1/repo/issue_comment.go (100%) rename {routers => routes}/api/v1/repo/issue_label.go (100%) rename {routers => routes}/api/v1/repo/key.go (98%) rename {routers => routes}/api/v1/repo/label.go (100%) rename {routers => routes}/api/v1/repo/milestone.go (100%) rename {routers => routes}/api/v1/repo/repo.go (99%) rename {routers => routes}/api/v1/user/app.go (100%) rename {routers => routes}/api/v1/user/email.go (97%) rename {routers => routes}/api/v1/user/follower.go (100%) rename {routers => routes}/api/v1/user/key.go (97%) rename {routers => routes}/api/v1/user/user.go (100%) rename {routers => routes}/dev/template.go (100%) rename {routers => routes}/home.go (98%) rename {routers => routes}/install.go (99%) rename {routers => routes}/org/members.go (100%) rename {routers => routes}/org/org.go (100%) rename {routers => routes}/org/setting.go (99%) rename {routers => routes}/org/teams.go (100%) rename {routers => routes}/repo/branch.go (100%) rename {routers => routes}/repo/commit.go (100%) rename {routers => routes}/repo/download.go (100%) rename {routers => routes}/repo/editor.go (100%) rename {routers => routes}/repo/http.go (100%) rename {routers => routes}/repo/issue.go (100%) rename {routers => routes}/repo/pull.go (100%) rename {routers => routes}/repo/release.go (100%) rename {routers => routes}/repo/repo.go (100%) rename {routers => routes}/repo/setting.go (100%) rename {routers => routes}/repo/view.go (100%) rename {routers => routes}/repo/webhook.go (100%) rename {routers => routes}/repo/wiki.go (100%) rename {routers => routes}/user/auth.go (100%) rename {routers => routes}/user/home.go (100%) rename {routers => routes}/user/profile.go (98%) rename {routers => routes}/user/setting.go (100%) diff --git a/cmd/hook.go b/cmd/hook.go index 602690c63..0ff4a1c69 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -23,7 +23,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/httplib" "github.com/gogits/gogs/pkg/setting" - http "github.com/gogits/gogs/routers/repo" + http "github.com/gogits/gogs/routes/repo" ) var ( diff --git a/cmd/serv.go b/cmd/serv.go index d89ad5bdd..dd4c1217d 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -19,7 +19,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" "github.com/gogits/gogs/pkg/setting" - http "github.com/gogits/gogs/routers/repo" + http "github.com/gogits/gogs/routes/repo" ) const ( diff --git a/cmd/web.go b/cmd/web.go index e16e40b90..697542300 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -36,13 +36,13 @@ import ( "github.com/gogits/gogs/pkg/mailer" "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/pkg/template" - "github.com/gogits/gogs/routers" - "github.com/gogits/gogs/routers/admin" - apiv1 "github.com/gogits/gogs/routers/api/v1" - "github.com/gogits/gogs/routers/dev" - "github.com/gogits/gogs/routers/org" - "github.com/gogits/gogs/routers/repo" - "github.com/gogits/gogs/routers/user" + "github.com/gogits/gogs/routes" + "github.com/gogits/gogs/routes/admin" + apiv1 "github.com/gogits/gogs/routes/api/v1" + "github.com/gogits/gogs/routes/dev" + "github.com/gogits/gogs/routes/org" + "github.com/gogits/gogs/routes/repo" + "github.com/gogits/gogs/routes/user" ) var Web = cli.Command{ @@ -160,7 +160,7 @@ func runWeb(c *cli.Context) error { if c.IsSet("config") { setting.CustomConf = c.String("config") } - routers.GlobalInit() + routes.GlobalInit() checkVersion() m := newMacaron() @@ -175,17 +175,17 @@ func runWeb(c *cli.Context) error { // FIXME: not all routes need go through same middlewares. // Especially some AJAX requests, we can reduce middleware number to improve performance. // Routers. - m.Get("/", ignSignIn, routers.Home) + m.Get("/", ignSignIn, routes.Home) m.Group("/explore", func() { m.Get("", func(c *context.Context) { c.Redirect(setting.AppSubURL + "/explore/repos") }) - m.Get("/repos", routers.ExploreRepos) - m.Get("/users", routers.ExploreUsers) - m.Get("/organizations", routers.ExploreOrganizations) + m.Get("/repos", routes.ExploreRepos) + m.Get("/users", routes.ExploreUsers) + m.Get("/organizations", routes.ExploreOrganizations) }, ignSignIn) - m.Combo("/install", routers.InstallInit).Get(routers.Install). - Post(bindIgnErr(form.Install{}), routers.InstallPost) + m.Combo("/install", routes.InstallInit).Get(routes.Install). + Post(bindIgnErr(form.Install{}), routes.InstallPost) m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues) // ***** START: User ***** @@ -651,7 +651,7 @@ func runWeb(c *cli.Context) error { }) // Not found handler. - m.NotFound(routers.NotFound) + m.NotFound(routes.NotFound) // Flag for port number in case first time run conflict. if c.IsSet("port") { diff --git a/gogs.go b/gogs.go index 97d221466..8549e4317 100644 --- a/gogs.go +++ b/gogs.go @@ -16,7 +16,7 @@ import ( "github.com/gogits/gogs/pkg/setting" ) -const APP_VER = "0.11.19.0609" +const APP_VER = "0.11.19.0611" func init() { setting.AppVer = APP_VER diff --git a/routers/admin/admin.go b/routes/admin/admin.go similarity index 100% rename from routers/admin/admin.go rename to routes/admin/admin.go diff --git a/routers/admin/auths.go b/routes/admin/auths.go similarity index 100% rename from routers/admin/auths.go rename to routes/admin/auths.go diff --git a/routers/admin/notice.go b/routes/admin/notice.go similarity index 100% rename from routers/admin/notice.go rename to routes/admin/notice.go diff --git a/routers/admin/orgs.go b/routes/admin/orgs.go similarity index 88% rename from routers/admin/orgs.go rename to routes/admin/orgs.go index 4b995acd6..f42e1fdf8 100644 --- a/routers/admin/orgs.go +++ b/routes/admin/orgs.go @@ -8,7 +8,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/pkg/setting" - "github.com/gogits/gogs/routers" + "github.com/gogits/gogs/routes" ) const ( @@ -20,7 +20,7 @@ func Organizations(c *context.Context) { c.Data["PageIsAdmin"] = true c.Data["PageIsAdminOrganizations"] = true - routers.RenderUserSearch(c, &routers.UserSearchOptions{ + routes.RenderUserSearch(c, &routes.UserSearchOptions{ Type: models.USER_TYPE_ORGANIZATION, Counter: models.CountOrganizations, Ranger: models.Organizations, diff --git a/routers/admin/repos.go b/routes/admin/repos.go similarity index 100% rename from routers/admin/repos.go rename to routes/admin/repos.go diff --git a/routers/admin/users.go b/routes/admin/users.go similarity index 98% rename from routers/admin/users.go rename to routes/admin/users.go index 237f2dc65..cfeb73de0 100644 --- a/routers/admin/users.go +++ b/routes/admin/users.go @@ -15,7 +15,7 @@ import ( "github.com/gogits/gogs/pkg/form" "github.com/gogits/gogs/pkg/mailer" "github.com/gogits/gogs/pkg/setting" - "github.com/gogits/gogs/routers" + "github.com/gogits/gogs/routes" ) const ( @@ -29,7 +29,7 @@ func Users(c *context.Context) { c.Data["PageIsAdmin"] = true c.Data["PageIsAdminUsers"] = true - routers.RenderUserSearch(c, &routers.UserSearchOptions{ + routes.RenderUserSearch(c, &routes.UserSearchOptions{ Type: models.USER_TYPE_INDIVIDUAL, Counter: models.CountUsers, Ranger: models.Users, diff --git a/routers/api/v1/admin/org.go b/routes/api/v1/admin/org.go similarity index 92% rename from routers/api/v1/admin/org.go rename to routes/api/v1/admin/org.go index 996a83bf9..0f84ed2e7 100644 --- a/routers/api/v1/admin/org.go +++ b/routes/api/v1/admin/org.go @@ -9,8 +9,8 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/context" - "github.com/gogits/gogs/routers/api/v1/convert" - "github.com/gogits/gogs/routers/api/v1/user" + "github.com/gogits/gogs/routes/api/v1/convert" + "github.com/gogits/gogs/routes/api/v1/user" ) // https://github.com/gogits/go-gogs-client/wiki/Administration-Organizations#create-a-new-organization diff --git a/routers/api/v1/admin/org_repo.go b/routes/api/v1/admin/org_repo.go similarity index 100% rename from routers/api/v1/admin/org_repo.go rename to routes/api/v1/admin/org_repo.go diff --git a/routers/api/v1/admin/org_team.go b/routes/api/v1/admin/org_team.go similarity index 92% rename from routers/api/v1/admin/org_team.go rename to routes/api/v1/admin/org_team.go index 7ec6c08a1..ae7485045 100644 --- a/routers/api/v1/admin/org_team.go +++ b/routes/api/v1/admin/org_team.go @@ -9,8 +9,8 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/context" - "github.com/gogits/gogs/routers/api/v1/convert" - "github.com/gogits/gogs/routers/api/v1/user" + "github.com/gogits/gogs/routes/api/v1/convert" + "github.com/gogits/gogs/routes/api/v1/user" ) func CreateTeam(c *context.APIContext, form api.CreateTeamOption) { diff --git a/routers/api/v1/admin/repo.go b/routes/api/v1/admin/repo.go similarity index 85% rename from routers/api/v1/admin/repo.go rename to routes/api/v1/admin/repo.go index 6c8e8e8d1..920bac8d6 100644 --- a/routers/api/v1/admin/repo.go +++ b/routes/api/v1/admin/repo.go @@ -8,8 +8,8 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/pkg/context" - "github.com/gogits/gogs/routers/api/v1/repo" - "github.com/gogits/gogs/routers/api/v1/user" + "github.com/gogits/gogs/routes/api/v1/repo" + "github.com/gogits/gogs/routes/api/v1/user" ) // https://github.com/gogits/go-gogs-client/wiki/Administration-Repositories#create-a-new-repository diff --git a/routers/api/v1/admin/user.go b/routes/api/v1/admin/user.go similarity index 98% rename from routers/api/v1/admin/user.go rename to routes/api/v1/admin/user.go index 8776217d6..623911fd9 100644 --- a/routers/api/v1/admin/user.go +++ b/routes/api/v1/admin/user.go @@ -13,7 +13,7 @@ import ( "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" + "github.com/gogits/gogs/routes/api/v1/user" ) func parseLoginSource(c *context.APIContext, u *models.User, sourceID int64, loginName string) { diff --git a/routers/api/v1/api.go b/routes/api/v1/api.go similarity index 97% rename from routers/api/v1/api.go rename to routes/api/v1/api.go index 35ca861a8..510c54cfd 100644 --- a/routers/api/v1/api.go +++ b/routes/api/v1/api.go @@ -16,11 +16,11 @@ import ( "github.com/gogits/gogs/models/errors" "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" - "github.com/gogits/gogs/routers/api/v1/repo" - "github.com/gogits/gogs/routers/api/v1/user" + "github.com/gogits/gogs/routes/api/v1/admin" + "github.com/gogits/gogs/routes/api/v1/misc" + "github.com/gogits/gogs/routes/api/v1/org" + "github.com/gogits/gogs/routes/api/v1/repo" + "github.com/gogits/gogs/routes/api/v1/user" ) func repoAssignment() macaron.Handler { diff --git a/routers/api/v1/convert/convert.go b/routes/api/v1/convert/convert.go similarity index 100% rename from routers/api/v1/convert/convert.go rename to routes/api/v1/convert/convert.go diff --git a/routers/api/v1/convert/utils.go b/routes/api/v1/convert/utils.go similarity index 100% rename from routers/api/v1/convert/utils.go rename to routes/api/v1/convert/utils.go diff --git a/routers/api/v1/misc/markdown.go b/routes/api/v1/misc/markdown.go similarity index 100% rename from routers/api/v1/misc/markdown.go rename to routes/api/v1/misc/markdown.go diff --git a/routers/api/v1/org/org.go b/routes/api/v1/org/org.go similarity index 94% rename from routers/api/v1/org/org.go rename to routes/api/v1/org/org.go index 107fc19ca..2f8832caf 100644 --- a/routers/api/v1/org/org.go +++ b/routes/api/v1/org/org.go @@ -9,8 +9,8 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/context" - "github.com/gogits/gogs/routers/api/v1/convert" - "github.com/gogits/gogs/routers/api/v1/user" + "github.com/gogits/gogs/routes/api/v1/convert" + "github.com/gogits/gogs/routes/api/v1/user" ) func listUserOrgs(c *context.APIContext, u *models.User, all bool) { diff --git a/routers/api/v1/org/team.go b/routes/api/v1/org/team.go similarity index 92% rename from routers/api/v1/org/team.go rename to routes/api/v1/org/team.go index a952ea53b..fd92e7283 100644 --- a/routers/api/v1/org/team.go +++ b/routes/api/v1/org/team.go @@ -8,7 +8,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/pkg/context" - "github.com/gogits/gogs/routers/api/v1/convert" + "github.com/gogits/gogs/routes/api/v1/convert" ) func ListTeams(c *context.APIContext) { diff --git a/routers/api/v1/repo/branch.go b/routes/api/v1/repo/branch.go similarity index 96% rename from routers/api/v1/repo/branch.go rename to routes/api/v1/repo/branch.go index 3d5e646c8..d8c2697b2 100644 --- a/routers/api/v1/repo/branch.go +++ b/routes/api/v1/repo/branch.go @@ -9,7 +9,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/context" - "github.com/gogits/gogs/routers/api/v1/convert" + "github.com/gogits/gogs/routes/api/v1/convert" ) // https://github.com/gogits/go-gogs-client/wiki/Repositories#get-branch diff --git a/routers/api/v1/repo/collaborators.go b/routes/api/v1/repo/collaborators.go similarity index 100% rename from routers/api/v1/repo/collaborators.go rename to routes/api/v1/repo/collaborators.go diff --git a/routers/api/v1/repo/file.go b/routes/api/v1/repo/file.go similarity index 97% rename from routers/api/v1/repo/file.go rename to routes/api/v1/repo/file.go index df6a4857b..c783e81f0 100644 --- a/routers/api/v1/repo/file.go +++ b/routes/api/v1/repo/file.go @@ -9,7 +9,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/context" - "github.com/gogits/gogs/routers/repo" + "github.com/gogits/gogs/routes/repo" ) // https://github.com/gogits/go-gogs-client/wiki/Repositories-Contents#download-raw-content diff --git a/routers/api/v1/repo/hook.go b/routes/api/v1/repo/hook.go similarity index 99% rename from routers/api/v1/repo/hook.go rename to routes/api/v1/repo/hook.go index 7c2b293e2..66125c50c 100644 --- a/routers/api/v1/repo/hook.go +++ b/routes/api/v1/repo/hook.go @@ -14,7 +14,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" "github.com/gogits/gogs/pkg/context" - "github.com/gogits/gogs/routers/api/v1/convert" + "github.com/gogits/gogs/routes/api/v1/convert" ) // https://github.com/gogits/go-gogs-client/wiki/Repositories#list-hooks diff --git a/routers/api/v1/repo/issue.go b/routes/api/v1/repo/issue.go similarity index 100% rename from routers/api/v1/repo/issue.go rename to routes/api/v1/repo/issue.go diff --git a/routers/api/v1/repo/issue_comment.go b/routes/api/v1/repo/issue_comment.go similarity index 100% rename from routers/api/v1/repo/issue_comment.go rename to routes/api/v1/repo/issue_comment.go diff --git a/routers/api/v1/repo/issue_label.go b/routes/api/v1/repo/issue_label.go similarity index 100% rename from routers/api/v1/repo/issue_label.go rename to routes/api/v1/repo/issue_label.go diff --git a/routers/api/v1/repo/key.go b/routes/api/v1/repo/key.go similarity index 98% rename from routers/api/v1/repo/key.go rename to routes/api/v1/repo/key.go index 901df4c7e..405440d22 100644 --- a/routers/api/v1/repo/key.go +++ b/routes/api/v1/repo/key.go @@ -12,7 +12,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/pkg/setting" - "github.com/gogits/gogs/routers/api/v1/convert" + "github.com/gogits/gogs/routes/api/v1/convert" ) func composeDeployKeysAPILink(repoPath string) string { diff --git a/routers/api/v1/repo/label.go b/routes/api/v1/repo/label.go similarity index 100% rename from routers/api/v1/repo/label.go rename to routes/api/v1/repo/label.go diff --git a/routers/api/v1/repo/milestone.go b/routes/api/v1/repo/milestone.go similarity index 100% rename from routers/api/v1/repo/milestone.go rename to routes/api/v1/repo/milestone.go diff --git a/routers/api/v1/repo/repo.go b/routes/api/v1/repo/repo.go similarity index 99% rename from routers/api/v1/repo/repo.go rename to routes/api/v1/repo/repo.go index 727e1678f..8410dcca8 100644 --- a/routers/api/v1/repo/repo.go +++ b/routes/api/v1/repo/repo.go @@ -16,7 +16,7 @@ import ( "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" + "github.com/gogits/gogs/routes/api/v1/convert" ) // https://github.com/gogits/go-gogs-client/wiki/Repositories#search-repositories diff --git a/routers/api/v1/user/app.go b/routes/api/v1/user/app.go similarity index 100% rename from routers/api/v1/user/app.go rename to routes/api/v1/user/app.go diff --git a/routers/api/v1/user/email.go b/routes/api/v1/user/email.go similarity index 97% rename from routers/api/v1/user/email.go rename to routes/api/v1/user/email.go index 7c527a1a3..bd1ea52b4 100644 --- a/routers/api/v1/user/email.go +++ b/routes/api/v1/user/email.go @@ -10,7 +10,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/pkg/setting" - "github.com/gogits/gogs/routers/api/v1/convert" + "github.com/gogits/gogs/routes/api/v1/convert" ) // https://github.com/gogits/go-gogs-client/wiki/Users-Emails#list-email-addresses-for-a-user diff --git a/routers/api/v1/user/follower.go b/routes/api/v1/user/follower.go similarity index 100% rename from routers/api/v1/user/follower.go rename to routes/api/v1/user/follower.go diff --git a/routers/api/v1/user/key.go b/routes/api/v1/user/key.go similarity index 97% rename from routers/api/v1/user/key.go rename to routes/api/v1/user/key.go index f0c833f58..aef42afc3 100644 --- a/routers/api/v1/user/key.go +++ b/routes/api/v1/user/key.go @@ -11,8 +11,8 @@ import ( "github.com/gogits/gogs/models/errors" "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" + "github.com/gogits/gogs/routes/api/v1/convert" + "github.com/gogits/gogs/routes/api/v1/repo" ) func GetUserByParamsName(c *context.APIContext, name string) *models.User { diff --git a/routers/api/v1/user/user.go b/routes/api/v1/user/user.go similarity index 100% rename from routers/api/v1/user/user.go rename to routes/api/v1/user/user.go diff --git a/routers/dev/template.go b/routes/dev/template.go similarity index 100% rename from routers/dev/template.go rename to routes/dev/template.go diff --git a/routers/home.go b/routes/home.go similarity index 98% rename from routers/home.go rename to routes/home.go index bb43dc581..9c7133919 100644 --- a/routers/home.go +++ b/routes/home.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package routers +package routes import ( "github.com/Unknwon/paginater" @@ -10,7 +10,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/pkg/setting" - "github.com/gogits/gogs/routers/user" + "github.com/gogits/gogs/routes/user" ) const ( diff --git a/routers/install.go b/routes/install.go similarity index 99% rename from routers/install.go rename to routes/install.go index 3b48d8d3f..948c67c2d 100644 --- a/routers/install.go +++ b/routes/install.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package routers +package routes import ( "net/mail" diff --git a/routers/org/members.go b/routes/org/members.go similarity index 100% rename from routers/org/members.go rename to routes/org/members.go diff --git a/routers/org/org.go b/routes/org/org.go similarity index 100% rename from routers/org/org.go rename to routes/org/org.go diff --git a/routers/org/setting.go b/routes/org/setting.go similarity index 99% rename from routers/org/setting.go rename to routes/org/setting.go index 8e2e556f2..397ffa8f7 100644 --- a/routers/org/setting.go +++ b/routes/org/setting.go @@ -14,7 +14,7 @@ import ( "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/pkg/form" "github.com/gogits/gogs/pkg/setting" - "github.com/gogits/gogs/routers/user" + "github.com/gogits/gogs/routes/user" ) const ( diff --git a/routers/org/teams.go b/routes/org/teams.go similarity index 100% rename from routers/org/teams.go rename to routes/org/teams.go diff --git a/routers/repo/branch.go b/routes/repo/branch.go similarity index 100% rename from routers/repo/branch.go rename to routes/repo/branch.go diff --git a/routers/repo/commit.go b/routes/repo/commit.go similarity index 100% rename from routers/repo/commit.go rename to routes/repo/commit.go diff --git a/routers/repo/download.go b/routes/repo/download.go similarity index 100% rename from routers/repo/download.go rename to routes/repo/download.go diff --git a/routers/repo/editor.go b/routes/repo/editor.go similarity index 100% rename from routers/repo/editor.go rename to routes/repo/editor.go diff --git a/routers/repo/http.go b/routes/repo/http.go similarity index 100% rename from routers/repo/http.go rename to routes/repo/http.go diff --git a/routers/repo/issue.go b/routes/repo/issue.go similarity index 100% rename from routers/repo/issue.go rename to routes/repo/issue.go diff --git a/routers/repo/pull.go b/routes/repo/pull.go similarity index 100% rename from routers/repo/pull.go rename to routes/repo/pull.go diff --git a/routers/repo/release.go b/routes/repo/release.go similarity index 100% rename from routers/repo/release.go rename to routes/repo/release.go diff --git a/routers/repo/repo.go b/routes/repo/repo.go similarity index 100% rename from routers/repo/repo.go rename to routes/repo/repo.go diff --git a/routers/repo/setting.go b/routes/repo/setting.go similarity index 100% rename from routers/repo/setting.go rename to routes/repo/setting.go diff --git a/routers/repo/view.go b/routes/repo/view.go similarity index 100% rename from routers/repo/view.go rename to routes/repo/view.go diff --git a/routers/repo/webhook.go b/routes/repo/webhook.go similarity index 100% rename from routers/repo/webhook.go rename to routes/repo/webhook.go diff --git a/routers/repo/wiki.go b/routes/repo/wiki.go similarity index 100% rename from routers/repo/wiki.go rename to routes/repo/wiki.go diff --git a/routers/user/auth.go b/routes/user/auth.go similarity index 100% rename from routers/user/auth.go rename to routes/user/auth.go diff --git a/routers/user/home.go b/routes/user/home.go similarity index 100% rename from routers/user/home.go rename to routes/user/home.go diff --git a/routers/user/profile.go b/routes/user/profile.go similarity index 98% rename from routers/user/profile.go rename to routes/user/profile.go index dc8ba6ae0..a6eba351e 100644 --- a/routers/user/profile.go +++ b/routes/user/profile.go @@ -15,7 +15,7 @@ import ( "github.com/gogits/gogs/models/errors" "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/pkg/setting" - "github.com/gogits/gogs/routers/repo" + "github.com/gogits/gogs/routes/repo" ) const ( diff --git a/routers/user/setting.go b/routes/user/setting.go similarity index 100% rename from routers/user/setting.go rename to routes/user/setting.go diff --git a/templates/.VERSION b/templates/.VERSION index 95335b2f5..82236ad37 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.11.19.0609 \ No newline at end of file +0.11.19.0611 \ No newline at end of file