From d05395fe906dad7741201faa69a54fef538deda9 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 4 Apr 2017 19:29:59 -0400 Subject: [PATCH] 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 --- .bra.toml | 2 +- Makefile | 18 ++++++++--------- cmd/admin.go | 2 +- cmd/backup.go | 2 +- cmd/hook.go | 4 ++-- cmd/import.go | 2 +- cmd/restore.go | 6 +++--- cmd/serv.go | 2 +- cmd/web.go | 12 +++++------ gogs.go | 2 +- models/action.go | 4 ++-- models/admin.go | 4 ++-- models/attachment.go | 2 +- models/comment.go | 2 +- models/git_diff.go | 6 +++--- models/issue.go | 4 ++-- models/issue_label.go | 2 +- models/issue_mail.go | 6 +++--- models/login_source.go | 4 ++-- models/migrations/migrations.go | 4 ++-- models/migrations/v15.go | 2 +- models/migrations/v16.go | 2 +- models/milestone.go | 2 +- models/mirror.go | 6 +++--- models/models.go | 2 +- models/pull.go | 6 +++--- models/release.go | 2 +- models/repo.go | 10 +++++----- models/repo_branch.go | 2 +- models/repo_editor.go | 4 ++-- models/repo_test.go | 2 +- models/ssh_key.go | 6 +++--- models/ssh_key_test.go | 2 +- models/token.go | 2 +- models/user.go | 6 +++--- models/webhook.go | 6 +++--- models/webhook_discord.go | 2 +- models/webhook_slack.go | 2 +- models/wiki.go | 4 ++-- {modules => pkg}/auth/auth.go | 4 ++-- {modules => pkg}/auth/ldap/README.md | 0 {modules => pkg}/auth/ldap/ldap.go | 0 {modules => pkg}/auth/pam/pam.go | 0 {modules => pkg}/auth/pam/pam_stub.go | 0 {modules => pkg}/avatar/avatar.go | 0 {modules => pkg}/avatar/avatar_test.go | 0 {modules => pkg}/base/base.go | 0 {modules => pkg}/base/file.go | 0 {modules => pkg}/base/tool.go | 2 +- {modules => pkg}/bindata/bindata.go | 0 {modules => pkg}/context/api.go | 4 ++-- {modules => pkg}/context/api_org.go | 0 {modules => pkg}/context/auth.go | 4 ++-- {modules => pkg}/context/context.go | 8 ++++---- {modules => pkg}/context/org.go | 2 +- {modules => pkg}/context/repo.go | 2 +- {modules => pkg}/cron/cron.go | 2 +- {modules => pkg}/form/admin.go | 0 {modules => pkg}/form/auth.go | 0 {modules => pkg}/form/form.go | 0 {modules => pkg}/form/org.go | 0 {modules => pkg}/form/repo.go | 0 {modules => pkg}/form/user.go | 0 {modules => pkg}/httplib/httplib.go | 0 {modules => pkg}/mailer/mail.go | 6 +++--- {modules => pkg}/mailer/mailer.go | 2 +- {modules => pkg}/markup/markdown.go | 4 ++-- {modules => pkg}/markup/markdown_test.go | 4 ++-- {modules => pkg}/markup/markup.go | 4 ++-- {modules => pkg}/markup/markup_test.go | 4 ++-- {modules => pkg}/markup/sanitizer.go | 2 +- {modules => pkg}/markup/sanitizer_test.go | 2 +- {modules => pkg}/process/manager.go | 0 {modules => pkg}/setting/miniwinsvc.go | 0 {modules => pkg}/setting/setting.go | 4 ++-- {modules => pkg}/ssh/ssh.go | 2 +- {modules => pkg}/sync/exclusive_pool.go | 0 {modules => pkg}/sync/status_pool.go | 0 {modules => pkg}/sync/unique_queue.go | 0 .../template/highlight/highlight.go | 2 +- {modules => pkg}/template/template.go | 6 +++--- {modules => pkg}/user/user.go | 0 routers/admin/admin.go | 12 +++++------ routers/admin/auths.go | 10 +++++----- routers/admin/notice.go | 6 +++--- routers/admin/orgs.go | 6 +++--- routers/admin/repos.go | 6 +++--- routers/admin/users.go | 10 +++++----- routers/api/v1/admin/org.go | 2 +- routers/api/v1/admin/org_repo.go | 2 +- routers/api/v1/admin/org_team.go | 2 +- routers/api/v1/admin/repo.go | 2 +- routers/api/v1/admin/user.go | 6 +++--- routers/api/v1/api.go | 4 ++-- routers/api/v1/convert/utils.go | 2 +- routers/api/v1/misc/markdown.go | 4 ++-- routers/api/v1/org/org.go | 2 +- routers/api/v1/org/team.go | 2 +- routers/api/v1/repo/branch.go | 2 +- routers/api/v1/repo/collaborators.go | 2 +- routers/api/v1/repo/file.go | 2 +- routers/api/v1/repo/hook.go | 2 +- routers/api/v1/repo/issue.go | 4 ++-- routers/api/v1/repo/issue_comment.go | 2 +- routers/api/v1/repo/issue_label.go | 2 +- routers/api/v1/repo/key.go | 4 ++-- routers/api/v1/repo/label.go | 2 +- routers/api/v1/repo/milestone.go | 2 +- routers/api/v1/repo/repo.go | 6 +++--- routers/api/v1/user/app.go | 2 +- routers/api/v1/user/email.go | 4 ++-- routers/api/v1/user/follower.go | 2 +- routers/api/v1/user/key.go | 4 ++-- routers/api/v1/user/user.go | 2 +- routers/dev/template.go | 6 +++--- routers/home.go | 6 +++--- routers/install.go | 20 +++++++++---------- routers/org/members.go | 6 +++--- routers/org/org.go | 8 ++++---- routers/org/setting.go | 8 ++++---- routers/org/teams.go | 6 +++--- routers/repo/branch.go | 4 ++-- routers/repo/commit.go | 6 +++--- routers/repo/download.go | 6 +++--- routers/repo/editor.go | 10 +++++----- routers/repo/http.go | 6 +++--- routers/repo/issue.go | 10 +++++----- routers/repo/pull.go | 8 ++++---- routers/repo/release.go | 10 +++++----- routers/repo/repo.go | 8 ++++---- routers/repo/setting.go | 10 +++++----- routers/repo/view.go | 12 +++++------ routers/repo/webhook.go | 8 ++++---- routers/repo/wiki.go | 8 ++++---- routers/user/auth.go | 10 +++++----- routers/user/home.go | 6 +++--- routers/user/profile.go | 6 +++--- routers/user/setting.go | 10 +++++----- 138 files changed, 275 insertions(+), 275 deletions(-) rename {modules => pkg}/auth/auth.go (97%) rename {modules => pkg}/auth/ldap/README.md (100%) rename {modules => pkg}/auth/ldap/ldap.go (100%) rename {modules => pkg}/auth/pam/pam.go (100%) rename {modules => pkg}/auth/pam/pam_stub.go (100%) rename {modules => pkg}/avatar/avatar.go (100%) rename {modules => pkg}/avatar/avatar_test.go (100%) rename {modules => pkg}/base/base.go (100%) rename {modules => pkg}/base/file.go (100%) rename {modules => pkg}/base/tool.go (99%) rename {modules => pkg}/bindata/bindata.go (100%) rename {modules => pkg}/context/api.go (95%) rename {modules => pkg}/context/api_org.go (100%) rename {modules => pkg}/context/auth.go (96%) rename {modules => pkg}/context/context.go (97%) rename {modules => pkg}/context/org.go (98%) rename {modules => pkg}/context/repo.go (99%) rename {modules => pkg}/cron/cron.go (97%) rename {modules => pkg}/form/admin.go (100%) rename {modules => pkg}/form/auth.go (100%) rename {modules => pkg}/form/form.go (100%) rename {modules => pkg}/form/org.go (100%) rename {modules => pkg}/form/repo.go (100%) rename {modules => pkg}/form/user.go (100%) rename {modules => pkg}/httplib/httplib.go (100%) rename {modules => pkg}/mailer/mail.go (98%) rename {modules => pkg}/mailer/mailer.go (99%) rename {modules => pkg}/markup/markdown.go (98%) rename {modules => pkg}/markup/markdown_test.go (98%) rename {modules => pkg}/markup/markup.go (99%) rename {modules => pkg}/markup/markup_test.go (99%) rename {modules => pkg}/markup/sanitizer.go (97%) rename {modules => pkg}/markup/sanitizer_test.go (96%) rename {modules => pkg}/process/manager.go (100%) rename {modules => pkg}/setting/miniwinsvc.go (100%) rename {modules => pkg}/setting/setting.go (99%) rename {modules => pkg}/ssh/ssh.go (99%) rename {modules => pkg}/sync/exclusive_pool.go (100%) rename {modules => pkg}/sync/status_pool.go (100%) rename {modules => pkg}/sync/unique_queue.go (100%) rename {modules => pkg}/template/highlight/highlight.go (97%) rename {modules => pkg}/template/template.go (98%) rename {modules => pkg}/user/user.go (100%) diff --git a/.bra.toml b/.bra.toml index 3fd4e0c6..83205fc6 100644 --- a/.bra.toml +++ b/.bra.toml @@ -7,7 +7,7 @@ watch_all = true watch_dirs = [ "$WORKDIR/cmd", "$WORKDIR/models", - "$WORKDIR/modules", + "$WORKDIR/pkg", "$WORKDIR/routers" ] watch_exts = [".go"] diff --git a/Makefile b/Makefile index a71776ff..507632dd 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ -LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')" -LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildGitHash=$(shell git rev-parse HEAD)" +LDFLAGS += -X "github.com/gogits/gogs/pkg/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')" +LDFLAGS += -X "github.com/gogits/gogs/pkg/setting.BuildGitHash=$(shell git rev-parse HEAD)" DATA_FILES := $(shell find conf | sed 's/ /\\ /g') LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less) -GENERATED := modules/bindata/bindata.go public/css/gogs.css +GENERATED := pkg/bindata/bindata.go public/css/gogs.css OS := $(shell uname) @@ -27,7 +27,7 @@ dist: release govet: $(GOVET) gogs.go - $(GOVET) models modules routers + $(GOVET) models pkg routers build: $(GENERATED) go install $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)' @@ -50,9 +50,9 @@ pack: release: build pack -bindata: modules/bindata/bindata.go +bindata: pkg/bindata/bindata.go -modules/bindata/bindata.go: $(DATA_FILES) +pkg/bindata/bindata.go: $(DATA_FILES) go-bindata -o=$@ -ignore="\\.DS_Store|README.md|TRANSLATORS" -pkg=bindata conf/... less: public/css/gogs.css @@ -70,11 +70,11 @@ test: go test -cover -race ./... fixme: - grep -rnw "FIXME" cmd routers models modules + grep -rnw "FIXME" cmd routers models pkg todo: - grep -rnw "TODO" cmd routers models modules + grep -rnw "TODO" cmd routers models pkg # Legacy code should be remove by the time of release legacy: - grep -rnw "LEGACY" cmd routers models modules + grep -rnw "LEGACY" cmd routers models pkg diff --git a/cmd/admin.go b/cmd/admin.go index 58e82f5f..02b192d5 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -10,7 +10,7 @@ import ( "github.com/urfave/cli" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) var ( diff --git a/cmd/backup.go b/cmd/backup.go index f5911455..5cd9142f 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -18,7 +18,7 @@ import ( "gopkg.in/ini.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) var Backup = cli.Command{ diff --git a/cmd/hook.go b/cmd/hook.go index c8448d5f..602690c6 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -21,8 +21,8 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/httplib" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/httplib" + "github.com/gogits/gogs/pkg/setting" http "github.com/gogits/gogs/routers/repo" ) diff --git a/cmd/import.go b/cmd/import.go index f71e4b18..726359ee 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -15,7 +15,7 @@ import ( "github.com/Unknwon/com" "github.com/urfave/cli" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) var ( diff --git a/cmd/restore.go b/cmd/restore.go index 4b9cbed2..36e49fa2 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -16,7 +16,7 @@ import ( "gopkg.in/ini.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) var Restore = cli.Command{ @@ -24,9 +24,9 @@ var Restore = cli.Command{ Usage: "Restore files and database from backup", Description: `Restore imports all related files and database from a backup archive. The backup version must lower or equal to current Gogs version. You can also import -backup from other database engines, which is useful for database migrating. +backup from other database engines, which is useful for database migrating. -If corresponding files or database tables are not presented in the archive, they will +If corresponding files or database tables are not presented in the archive, they will be skipped and remian unchanged.`, Action: runRestore, Flags: []cli.Flag{ diff --git a/cmd/serv.go b/cmd/serv.go index 763dc864..d89ad5bd 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -18,7 +18,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" http "github.com/gogits/gogs/routers/repo" ) diff --git a/cmd/web.go b/cmd/web.go index a0463939..86cb7732 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -30,12 +30,12 @@ import ( "gopkg.in/macaron.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/bindata" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/template" + "github.com/gogits/gogs/pkg/bindata" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "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" diff --git a/gogs.go b/gogs.go index 63945494..ccf1b6ab 100644 --- a/gogs.go +++ b/gogs.go @@ -13,7 +13,7 @@ import ( "github.com/urfave/cli" "github.com/gogits/gogs/cmd" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) const APP_VER = "0.11.2.0404" diff --git a/models/action.go b/models/action.go index d830a36f..e1378e99 100644 --- a/models/action.go +++ b/models/action.go @@ -21,8 +21,8 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/setting" ) type ActionType int diff --git a/models/admin.go b/models/admin.go index 045728e4..bad7a3bf 100644 --- a/models/admin.go +++ b/models/admin.go @@ -15,8 +15,8 @@ import ( "github.com/go-xorm/xorm" log "gopkg.in/clog.v1" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/setting" ) type NoticeType int diff --git a/models/attachment.go b/models/attachment.go index 4ba6adcb..583cb10b 100644 --- a/models/attachment.go +++ b/models/attachment.go @@ -15,7 +15,7 @@ import ( "github.com/go-xorm/xorm" gouuid "github.com/satori/go.uuid" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) // Attachment represent a attachment of issue/comment/release. diff --git a/models/comment.go b/models/comment.go index 7a46f6f8..d18b14df 100644 --- a/models/comment.go +++ b/models/comment.go @@ -16,7 +16,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/markup" + "github.com/gogits/gogs/pkg/markup" ) // CommentType defines whether a comment is just a simple comment, an action (like close) or a reference. diff --git a/models/git_diff.go b/models/git_diff.go index 7af7ee83..f8282940 100644 --- a/models/git_diff.go +++ b/models/git_diff.go @@ -17,9 +17,9 @@ import ( "github.com/gogits/git-module" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/template/highlight" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/setting" + "github.com/gogits/gogs/pkg/template/highlight" ) type DiffSection struct { diff --git a/models/issue.go b/models/issue.go index 6bcda7a9..789165c4 100644 --- a/models/issue.go +++ b/models/issue.go @@ -16,8 +16,8 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/setting" ) var ( diff --git a/models/issue_label.go b/models/issue_label.go index 9136b81a..096bba25 100644 --- a/models/issue_label.go +++ b/models/issue_label.go @@ -15,7 +15,7 @@ import ( api "github.com/gogits/go-gogs-client" - "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/pkg/base" ) var labelColorPattern = regexp.MustCompile("#([a-fA-F0-9]{6})") diff --git a/models/issue_mail.go b/models/issue_mail.go index d0447261..25f580d9 100644 --- a/models/issue_mail.go +++ b/models/issue_mail.go @@ -10,9 +10,9 @@ import ( "github.com/Unknwon/com" log "gopkg.in/clog.v1" - "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/mailer" + "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/setting" ) func (issue *Issue) MailSubject() string { diff --git a/models/login_source.go b/models/login_source.go index 29977fa3..03e6d6a3 100644 --- a/models/login_source.go +++ b/models/login_source.go @@ -20,8 +20,8 @@ import ( log "gopkg.in/clog.v1" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/auth/ldap" - "github.com/gogits/gogs/modules/auth/pam" + "github.com/gogits/gogs/pkg/auth/ldap" + "github.com/gogits/gogs/pkg/auth/pam" ) type LoginType int diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 7acd7259..2f6f828f 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -13,7 +13,7 @@ import ( "github.com/go-xorm/xorm" log "gopkg.in/clog.v1" - "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/pkg/base" ) const _MIN_DB_VER = 10 @@ -105,7 +105,7 @@ Please save following instructions to somewhere and start working: Once finished downloading, 1. Extract the archive and to upgrade steps as usual. -2. Run it once. To verify, you should see some migration traces. +2. Run it once. To verify, you should see some migration traces. 3. Once it starts web server successfully, stop it. 4. Now it's time to put back the release archive you originally intent to upgrade. 5. Enjoy! diff --git a/models/migrations/v15.go b/models/migrations/v15.go index 5d907582..65b2a313 100644 --- a/models/migrations/v15.go +++ b/models/migrations/v15.go @@ -15,7 +15,7 @@ import ( "github.com/go-xorm/xorm" log "gopkg.in/clog.v1" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) func generateAndMigrateGitHooks(x *xorm.Engine) (err error) { diff --git a/models/migrations/v16.go b/models/migrations/v16.go index 1c23dc41..c5facc81 100644 --- a/models/migrations/v16.go +++ b/models/migrations/v16.go @@ -14,7 +14,7 @@ import ( "github.com/gogits/git-module" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) func updateRepositorySizes(x *xorm.Engine) (err error) { diff --git a/models/milestone.go b/models/milestone.go index 206798e6..dbba0312 100644 --- a/models/milestone.go +++ b/models/milestone.go @@ -13,7 +13,7 @@ import ( api "github.com/gogits/go-gogs-client" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) // Milestone represents a milestone of repository. diff --git a/models/mirror.go b/models/mirror.go index 2200d777..4820520e 100644 --- a/models/mirror.go +++ b/models/mirror.go @@ -17,9 +17,9 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/process" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/sync" + "github.com/gogits/gogs/pkg/process" + "github.com/gogits/gogs/pkg/setting" + "github.com/gogits/gogs/pkg/sync" ) var MirrorQueue = sync.NewUniqueQueue(setting.Repository.MirrorQueueLength) diff --git a/models/models.go b/models/models.go index 1d0d5740..2eea56b1 100644 --- a/models/models.go +++ b/models/models.go @@ -24,7 +24,7 @@ import ( log "gopkg.in/clog.v1" "github.com/gogits/gogs/models/migrations" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) // Engine represents a xorm engine or session. diff --git a/models/pull.go b/models/pull.go index f46d69fc..5f7cbb57 100644 --- a/models/pull.go +++ b/models/pull.go @@ -19,9 +19,9 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/process" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/sync" + "github.com/gogits/gogs/pkg/process" + "github.com/gogits/gogs/pkg/setting" + "github.com/gogits/gogs/pkg/sync" ) var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength) diff --git a/models/release.go b/models/release.go index 993fa19a..1d387fb4 100644 --- a/models/release.go +++ b/models/release.go @@ -17,7 +17,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/process" + "github.com/gogits/gogs/pkg/process" ) // Release represents a release of repository. diff --git a/models/repo.go b/models/repo.go index b12ed58e..c9cf64c5 100644 --- a/models/repo.go +++ b/models/repo.go @@ -27,11 +27,11 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/bindata" - "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/process" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/sync" + "github.com/gogits/gogs/pkg/bindata" + "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/process" + "github.com/gogits/gogs/pkg/setting" + "github.com/gogits/gogs/pkg/sync" ) var repoWorkingPool = sync.NewExclusivePool() diff --git a/models/repo_branch.go b/models/repo_branch.go index de0ee26d..b0c7d55d 100644 --- a/models/repo_branch.go +++ b/models/repo_branch.go @@ -11,7 +11,7 @@ import ( "github.com/Unknwon/com" "github.com/gogits/git-module" - "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/pkg/base" ) type Branch struct { diff --git a/models/repo_editor.go b/models/repo_editor.go index a9990c99..3d01de6e 100644 --- a/models/repo_editor.go +++ b/models/repo_editor.go @@ -21,8 +21,8 @@ import ( git "github.com/gogits/git-module" - "github.com/gogits/gogs/modules/process" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/process" + "github.com/gogits/gogs/pkg/setting" ) // ___________ .___.__ __ ___________.__.__ diff --git a/models/repo_test.go b/models/repo_test.go index 2da5d839..76025a4c 100644 --- a/models/repo_test.go +++ b/models/repo_test.go @@ -6,7 +6,7 @@ import ( . "github.com/smartystreets/goconvey/convey" . "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/markup" + "github.com/gogits/gogs/pkg/markup" ) func TestRepo(t *testing.T) { diff --git a/models/ssh_key.go b/models/ssh_key.go index aedf42b9..b8a5095b 100644 --- a/models/ssh_key.go +++ b/models/ssh_key.go @@ -23,9 +23,9 @@ import ( "golang.org/x/crypto/ssh" log "gopkg.in/clog.v1" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/process" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/process" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/models/ssh_key_test.go b/models/ssh_key_test.go index 1cda60c5..537f16b0 100644 --- a/models/ssh_key_test.go +++ b/models/ssh_key_test.go @@ -11,7 +11,7 @@ import ( . "github.com/smartystreets/goconvey/convey" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) func init() { diff --git a/models/token.go b/models/token.go index d47545ae..c18a6616 100644 --- a/models/token.go +++ b/models/token.go @@ -10,7 +10,7 @@ import ( "github.com/go-xorm/xorm" gouuid "github.com/satori/go.uuid" - "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/pkg/base" ) // AccessToken represents a personal access token. diff --git a/models/user.go b/models/user.go index dadda252..13f37f6b 100644 --- a/models/user.go +++ b/models/user.go @@ -30,9 +30,9 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/avatar" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/avatar" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/setting" ) type UserType int diff --git a/models/webhook.go b/models/webhook.go index a1f8c343..e4e77490 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -22,9 +22,9 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/httplib" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/sync" + "github.com/gogits/gogs/pkg/httplib" + "github.com/gogits/gogs/pkg/setting" + "github.com/gogits/gogs/pkg/sync" ) var HookQueue = sync.NewUniqueQueue(setting.Webhook.QueueLength) diff --git a/models/webhook_discord.go b/models/webhook_discord.go index e403399a..e452043c 100644 --- a/models/webhook_discord.go +++ b/models/webhook_discord.go @@ -13,7 +13,7 @@ import ( "github.com/gogits/git-module" api "github.com/gogits/go-gogs-client" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) type DiscordEmbedFooterObject struct { diff --git a/models/webhook_slack.go b/models/webhook_slack.go index 46e8ef9a..e092d221 100644 --- a/models/webhook_slack.go +++ b/models/webhook_slack.go @@ -12,7 +12,7 @@ import ( "github.com/gogits/git-module" api "github.com/gogits/go-gogs-client" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) type SlackMeta struct { diff --git a/models/wiki.go b/models/wiki.go index 20285e3d..24d07938 100644 --- a/models/wiki.go +++ b/models/wiki.go @@ -17,8 +17,8 @@ import ( "github.com/gogits/git-module" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/sync" + "github.com/gogits/gogs/pkg/setting" + "github.com/gogits/gogs/pkg/sync" ) var wikiWorkingPool = sync.NewExclusivePool() diff --git a/modules/auth/auth.go b/pkg/auth/auth.go similarity index 97% rename from modules/auth/auth.go rename to pkg/auth/auth.go index 42995ae3..fd4d71c9 100644 --- a/modules/auth/auth.go +++ b/pkg/auth/auth.go @@ -15,8 +15,8 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/setting" ) func IsAPIPath(url string) bool { diff --git a/modules/auth/ldap/README.md b/pkg/auth/ldap/README.md similarity index 100% rename from modules/auth/ldap/README.md rename to pkg/auth/ldap/README.md diff --git a/modules/auth/ldap/ldap.go b/pkg/auth/ldap/ldap.go similarity index 100% rename from modules/auth/ldap/ldap.go rename to pkg/auth/ldap/ldap.go diff --git a/modules/auth/pam/pam.go b/pkg/auth/pam/pam.go similarity index 100% rename from modules/auth/pam/pam.go rename to pkg/auth/pam/pam.go diff --git a/modules/auth/pam/pam_stub.go b/pkg/auth/pam/pam_stub.go similarity index 100% rename from modules/auth/pam/pam_stub.go rename to pkg/auth/pam/pam_stub.go diff --git a/modules/avatar/avatar.go b/pkg/avatar/avatar.go similarity index 100% rename from modules/avatar/avatar.go rename to pkg/avatar/avatar.go diff --git a/modules/avatar/avatar_test.go b/pkg/avatar/avatar_test.go similarity index 100% rename from modules/avatar/avatar_test.go rename to pkg/avatar/avatar_test.go diff --git a/modules/base/base.go b/pkg/base/base.go similarity index 100% rename from modules/base/base.go rename to pkg/base/base.go diff --git a/modules/base/file.go b/pkg/base/file.go similarity index 100% rename from modules/base/file.go rename to pkg/base/file.go diff --git a/modules/base/tool.go b/pkg/base/tool.go similarity index 99% rename from modules/base/tool.go rename to pkg/base/tool.go index 7186e59d..800be844 100644 --- a/modules/base/tool.go +++ b/pkg/base/tool.go @@ -24,7 +24,7 @@ import ( "github.com/gogits/chardet" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) // EncodeMD5 encodes string to md5 hex value. diff --git a/modules/bindata/bindata.go b/pkg/bindata/bindata.go similarity index 100% rename from modules/bindata/bindata.go rename to pkg/bindata/bindata.go diff --git a/modules/context/api.go b/pkg/context/api.go similarity index 95% rename from modules/context/api.go rename to pkg/context/api.go index a499ec3c..a1c80bd1 100644 --- a/modules/context/api.go +++ b/pkg/context/api.go @@ -12,8 +12,8 @@ import ( log "gopkg.in/clog.v1" "gopkg.in/macaron.v1" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/setting" ) type APIContext struct { diff --git a/modules/context/api_org.go b/pkg/context/api_org.go similarity index 100% rename from modules/context/api_org.go rename to pkg/context/api_org.go diff --git a/modules/context/auth.go b/pkg/context/auth.go similarity index 96% rename from modules/context/auth.go rename to pkg/context/auth.go index 74677179..642a320b 100644 --- a/modules/context/auth.go +++ b/pkg/context/auth.go @@ -10,8 +10,8 @@ import ( "github.com/go-macaron/csrf" "gopkg.in/macaron.v1" - "github.com/gogits/gogs/modules/auth" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/auth" + "github.com/gogits/gogs/pkg/setting" ) type ToggleOptions struct { diff --git a/modules/context/context.go b/pkg/context/context.go similarity index 97% rename from modules/context/context.go rename to pkg/context/context.go index d434bad1..b3377833 100644 --- a/modules/context/context.go +++ b/pkg/context/context.go @@ -20,10 +20,10 @@ import ( "gopkg.in/macaron.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/auth" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/auth" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/setting" ) // Context represents context of a request. diff --git a/modules/context/org.go b/pkg/context/org.go similarity index 98% rename from modules/context/org.go rename to pkg/context/org.go index 3cde8d63..55c2ed04 100644 --- a/modules/context/org.go +++ b/pkg/context/org.go @@ -11,7 +11,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) type Organization struct { diff --git a/modules/context/repo.go b/pkg/context/repo.go similarity index 99% rename from modules/context/repo.go rename to pkg/context/repo.go index c93c0ded..00f0eaa1 100644 --- a/modules/context/repo.go +++ b/pkg/context/repo.go @@ -18,7 +18,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) type PullRequest struct { diff --git a/modules/cron/cron.go b/pkg/cron/cron.go similarity index 97% rename from modules/cron/cron.go rename to pkg/cron/cron.go index 79d7b76c..419be06b 100644 --- a/modules/cron/cron.go +++ b/pkg/cron/cron.go @@ -12,7 +12,7 @@ import ( "github.com/gogits/cron" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) var c = cron.New() diff --git a/modules/form/admin.go b/pkg/form/admin.go similarity index 100% rename from modules/form/admin.go rename to pkg/form/admin.go diff --git a/modules/form/auth.go b/pkg/form/auth.go similarity index 100% rename from modules/form/auth.go rename to pkg/form/auth.go diff --git a/modules/form/form.go b/pkg/form/form.go similarity index 100% rename from modules/form/form.go rename to pkg/form/form.go diff --git a/modules/form/org.go b/pkg/form/org.go similarity index 100% rename from modules/form/org.go rename to pkg/form/org.go diff --git a/modules/form/repo.go b/pkg/form/repo.go similarity index 100% rename from modules/form/repo.go rename to pkg/form/repo.go diff --git a/modules/form/user.go b/pkg/form/user.go similarity index 100% rename from modules/form/user.go rename to pkg/form/user.go diff --git a/modules/httplib/httplib.go b/pkg/httplib/httplib.go similarity index 100% rename from modules/httplib/httplib.go rename to pkg/httplib/httplib.go diff --git a/modules/mailer/mail.go b/pkg/mailer/mail.go similarity index 98% rename from modules/mailer/mail.go rename to pkg/mailer/mail.go index 95543294..20e2b309 100644 --- a/modules/mailer/mail.go +++ b/pkg/mailer/mail.go @@ -12,9 +12,9 @@ import ( "gopkg.in/gomail.v2" "gopkg.in/macaron.v1" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/modules/mailer/mailer.go b/pkg/mailer/mailer.go similarity index 99% rename from modules/mailer/mailer.go rename to pkg/mailer/mailer.go index 5eb68944..4c0960d6 100644 --- a/modules/mailer/mailer.go +++ b/pkg/mailer/mailer.go @@ -18,7 +18,7 @@ import ( log "gopkg.in/clog.v1" "gopkg.in/gomail.v2" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) type Message struct { diff --git a/modules/markup/markdown.go b/pkg/markup/markdown.go similarity index 98% rename from modules/markup/markdown.go rename to pkg/markup/markdown.go index c325f19f..3414a58c 100644 --- a/modules/markup/markdown.go +++ b/pkg/markup/markdown.go @@ -14,8 +14,8 @@ import ( "github.com/russross/blackfriday" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/setting" ) // IsMarkdownFile reports whether name looks like a Markdown file based on its extension. diff --git a/modules/markup/markdown_test.go b/pkg/markup/markdown_test.go similarity index 98% rename from modules/markup/markdown_test.go rename to pkg/markup/markdown_test.go index 8f048df8..a4bf074f 100644 --- a/modules/markup/markdown_test.go +++ b/pkg/markup/markdown_test.go @@ -12,8 +12,8 @@ import ( "github.com/russross/blackfriday" . "github.com/smartystreets/goconvey/convey" - . "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/setting" + . "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/setting" ) func Test_IsMarkdownFile(t *testing.T) { diff --git a/modules/markup/markup.go b/pkg/markup/markup.go similarity index 99% rename from modules/markup/markup.go rename to pkg/markup/markup.go index a1c862a9..5c92b74a 100644 --- a/modules/markup/markup.go +++ b/pkg/markup/markup.go @@ -14,8 +14,8 @@ import ( "github.com/Unknwon/com" "golang.org/x/net/html" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/setting" ) // IsReadmeFile reports whether name looks like a README file based on its extension. diff --git a/modules/markup/markup_test.go b/pkg/markup/markup_test.go similarity index 99% rename from modules/markup/markup_test.go rename to pkg/markup/markup_test.go index 8352911b..d3d72091 100644 --- a/modules/markup/markup_test.go +++ b/pkg/markup/markup_test.go @@ -10,8 +10,8 @@ import ( . "github.com/smartystreets/goconvey/convey" - . "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/setting" + . "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/setting" ) func Test_IsReadmeFile(t *testing.T) { diff --git a/modules/markup/sanitizer.go b/pkg/markup/sanitizer.go similarity index 97% rename from modules/markup/sanitizer.go rename to pkg/markup/sanitizer.go index 8a88f761..63ead6df 100644 --- a/modules/markup/sanitizer.go +++ b/pkg/markup/sanitizer.go @@ -10,7 +10,7 @@ import ( "github.com/microcosm-cc/bluemonday" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) // Sanitizer is a protection wrapper of *bluemonday.Policy which does not allow diff --git a/modules/markup/sanitizer_test.go b/pkg/markup/sanitizer_test.go similarity index 96% rename from modules/markup/sanitizer_test.go rename to pkg/markup/sanitizer_test.go index 2bd7d537..ae341acc 100644 --- a/modules/markup/sanitizer_test.go +++ b/pkg/markup/sanitizer_test.go @@ -9,7 +9,7 @@ import ( . "github.com/smartystreets/goconvey/convey" - . "github.com/gogits/gogs/modules/markup" + . "github.com/gogits/gogs/pkg/markup" ) func Test_Sanitizer(t *testing.T) { diff --git a/modules/process/manager.go b/pkg/process/manager.go similarity index 100% rename from modules/process/manager.go rename to pkg/process/manager.go diff --git a/modules/setting/miniwinsvc.go b/pkg/setting/miniwinsvc.go similarity index 100% rename from modules/setting/miniwinsvc.go rename to pkg/setting/miniwinsvc.go diff --git a/modules/setting/setting.go b/pkg/setting/setting.go similarity index 99% rename from modules/setting/setting.go rename to pkg/setting/setting.go index aeb644ac..6ce716ea 100644 --- a/modules/setting/setting.go +++ b/pkg/setting/setting.go @@ -26,8 +26,8 @@ import ( "github.com/gogits/go-libravatar" - "github.com/gogits/gogs/modules/bindata" - "github.com/gogits/gogs/modules/user" + "github.com/gogits/gogs/pkg/bindata" + "github.com/gogits/gogs/pkg/user" ) type Scheme string diff --git a/modules/ssh/ssh.go b/pkg/ssh/ssh.go similarity index 99% rename from modules/ssh/ssh.go rename to pkg/ssh/ssh.go index 1b95e3bc..d3526021 100644 --- a/modules/ssh/ssh.go +++ b/pkg/ssh/ssh.go @@ -19,7 +19,7 @@ import ( log "gopkg.in/clog.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) func cleanCommand(cmd string) string { diff --git a/modules/sync/exclusive_pool.go b/pkg/sync/exclusive_pool.go similarity index 100% rename from modules/sync/exclusive_pool.go rename to pkg/sync/exclusive_pool.go diff --git a/modules/sync/status_pool.go b/pkg/sync/status_pool.go similarity index 100% rename from modules/sync/status_pool.go rename to pkg/sync/status_pool.go diff --git a/modules/sync/unique_queue.go b/pkg/sync/unique_queue.go similarity index 100% rename from modules/sync/unique_queue.go rename to pkg/sync/unique_queue.go diff --git a/modules/template/highlight/highlight.go b/pkg/template/highlight/highlight.go similarity index 97% rename from modules/template/highlight/highlight.go rename to pkg/template/highlight/highlight.go index e823b428..05029a4a 100644 --- a/modules/template/highlight/highlight.go +++ b/pkg/template/highlight/highlight.go @@ -8,7 +8,7 @@ import ( "path" "strings" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/setting" ) var ( diff --git a/modules/template/template.go b/pkg/template/template.go similarity index 98% rename from modules/template/template.go rename to pkg/template/template.go index faae266b..61c47b8c 100644 --- a/modules/template/template.go +++ b/pkg/template/template.go @@ -22,9 +22,9 @@ import ( "gopkg.in/editorconfig/editorconfig-core-go.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/setting" ) func NewFuncMap() []template.FuncMap { diff --git a/modules/user/user.go b/pkg/user/user.go similarity index 100% rename from modules/user/user.go rename to pkg/user/user.go diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 3433e6f7..cd1f438e 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -15,12 +15,12 @@ import ( "gopkg.in/macaron.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/cron" - "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/process" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/cron" + "github.com/gogits/gogs/pkg/mailer" + "github.com/gogits/gogs/pkg/process" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/admin/auths.go b/routers/admin/auths.go index a6610e5d..255c13b1 100644 --- a/routers/admin/auths.go +++ b/routers/admin/auths.go @@ -12,11 +12,11 @@ import ( log "gopkg.in/clog.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/auth/ldap" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/auth/ldap" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/admin/notice.go b/routers/admin/notice.go index 5117676f..2fb04ffc 100644 --- a/routers/admin/notice.go +++ b/routers/admin/notice.go @@ -10,9 +10,9 @@ import ( log "gopkg.in/clog.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/admin/orgs.go b/routers/admin/orgs.go index 32000721..0150f33c 100644 --- a/routers/admin/orgs.go +++ b/routers/admin/orgs.go @@ -6,9 +6,9 @@ package admin import ( "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers" ) diff --git a/routers/admin/repos.go b/routers/admin/repos.go index 4f688a92..0eefbade 100644 --- a/routers/admin/repos.go +++ b/routers/admin/repos.go @@ -9,9 +9,9 @@ import ( log "gopkg.in/clog.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/admin/users.go b/routers/admin/users.go index 442b938e..0cb72000 100644 --- a/routers/admin/users.go +++ b/routers/admin/users.go @@ -11,11 +11,11 @@ import ( log "gopkg.in/clog.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/mailer" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers" ) 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) { diff --git a/routers/dev/template.go b/routers/dev/template.go index ee81f380..081ab4a0 100644 --- a/routers/dev/template.go +++ b/routers/dev/template.go @@ -6,9 +6,9 @@ package dev import ( "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) func TemplatePreview(ctx *context.Context) { diff --git a/routers/home.go b/routers/home.go index b928bc60..cb59850a 100644 --- a/routers/home.go +++ b/routers/home.go @@ -8,9 +8,9 @@ import ( "github.com/Unknwon/paginater" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers/user" ) diff --git a/routers/install.go b/routers/install.go index 9d9bb6d1..eb17f900 100644 --- a/routers/install.go +++ b/routers/install.go @@ -21,16 +21,16 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/cron" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/ssh" - "github.com/gogits/gogs/modules/template/highlight" - "github.com/gogits/gogs/modules/user" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/cron" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/mailer" + "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/setting" + "github.com/gogits/gogs/pkg/ssh" + "github.com/gogits/gogs/pkg/template/highlight" + "github.com/gogits/gogs/pkg/user" ) const ( diff --git a/routers/org/members.go b/routers/org/members.go index 2f059c8c..edc0c76c 100644 --- a/routers/org/members.go +++ b/routers/org/members.go @@ -10,9 +10,9 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/org/org.go b/routers/org/org.go index cf49733b..07249db5 100644 --- a/routers/org/org.go +++ b/routers/org/org.go @@ -8,10 +8,10 @@ import ( log "gopkg.in/clog.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/org/setting.go b/routers/org/setting.go index 5a07e2cb..9a5331f4 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -11,10 +11,10 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers/user" ) diff --git a/routers/org/teams.go b/routers/org/teams.go index abd2fd9e..ba40c6d4 100644 --- a/routers/org/teams.go +++ b/routers/org/teams.go @@ -12,9 +12,9 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" ) const ( diff --git a/routers/repo/branch.go b/routers/repo/branch.go index d9a45fba..786dc068 100644 --- a/routers/repo/branch.go +++ b/routers/repo/branch.go @@ -12,8 +12,8 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" ) const ( diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 21e5e916..2b5fc86f 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -11,9 +11,9 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/repo/download.go b/routers/repo/download.go index 3c253f90..95a0224e 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -10,9 +10,9 @@ import ( "github.com/gogits/git-module" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) func ServeData(ctx *context.Context, name string, reader io.Reader) error { diff --git a/routers/repo/editor.go b/routers/repo/editor.go index 480ff876..9bbee51c 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -15,11 +15,11 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/template" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/setting" + "github.com/gogits/gogs/pkg/template" ) const ( diff --git a/routers/repo/http.go b/routers/repo/http.go index 9b893f27..328cfa39 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -23,9 +23,9 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 8ab7c707..f7dc4b1b 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -19,11 +19,11 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 51d34877..987e703c 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -16,10 +16,10 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/repo/release.go b/routers/repo/release.go index 4d201181..692d7b2f 100644 --- a/routers/repo/release.go +++ b/routers/repo/release.go @@ -11,11 +11,11 @@ import ( log "gopkg.in/clog.v1" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 4604d643..3626ac49 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -17,10 +17,10 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 95cce36b..de255334 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -15,11 +15,11 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/mailer" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/repo/view.go b/routers/repo/view.go index 6785b759..abfe9333 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -18,12 +18,12 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/markup" - "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/modules/template" - "github.com/gogits/gogs/modules/template/highlight" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/markup" + "github.com/gogits/gogs/pkg/setting" + "github.com/gogits/gogs/pkg/template" + "github.com/gogits/gogs/pkg/template/highlight" ) const ( diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go index bc4701dd..aa76de2d 100644 --- a/routers/repo/webhook.go +++ b/routers/repo/webhook.go @@ -16,10 +16,10 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go index 44b5079a..643ad7b5 100644 --- a/routers/repo/wiki.go +++ b/routers/repo/wiki.go @@ -12,10 +12,10 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/markup" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/markup" ) const ( diff --git a/routers/user/auth.go b/routers/user/auth.go index be15e56e..35e73742 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -13,11 +13,11 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/mailer" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/user/home.go b/routers/user/home.go index ce8c2243..b85d3064 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -13,9 +13,9 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" ) const ( diff --git a/routers/user/profile.go b/routers/user/profile.go index ee5f97c5..10c48878 100644 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -13,9 +13,9 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/routers/repo" ) diff --git a/routers/user/setting.go b/routers/user/setting.go index e1fabb48..777a812e 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -14,11 +14,11 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/context" - "github.com/gogits/gogs/modules/form" - "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/context" + "github.com/gogits/gogs/pkg/form" + "github.com/gogits/gogs/pkg/mailer" + "github.com/gogits/gogs/pkg/setting" ) const (