diff options
Diffstat (limited to 'routers')
63 files changed, 75 insertions, 103 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 8339c1eaec..54fbddc58e 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -13,9 +13,6 @@ import ( "strings" "time" - "github.com/Unknwon/com" - "gopkg.in/macaron.v1" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" @@ -25,6 +22,9 @@ import ( "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" + + "gitea.com/macaron/macaron" + "github.com/unknwon/com" ) const ( diff --git a/routers/admin/auths.go b/routers/admin/auths.go index 81751f8955..8e0c27e226 100644 --- a/routers/admin/auths.go +++ b/routers/admin/auths.go @@ -16,7 +16,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "github.com/Unknwon/com" + "github.com/unknwon/com" "xorm.io/core" ) diff --git a/routers/admin/notice.go b/routers/admin/notice.go index d2c067c143..ad2bad2163 100644 --- a/routers/admin/notice.go +++ b/routers/admin/notice.go @@ -12,7 +12,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "github.com/Unknwon/com" + "github.com/unknwon/com" ) const ( diff --git a/routers/admin/users.go b/routers/admin/users.go index 8a99de01c2..aa595edad9 100644 --- a/routers/admin/users.go +++ b/routers/admin/users.go @@ -7,8 +7,6 @@ package admin import ( "strings" - "github.com/Unknwon/com" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" @@ -16,6 +14,8 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/routers" + + "github.com/unknwon/com" ) const ( diff --git a/routers/admin/users_test.go b/routers/admin/users_test.go index 17eadd1336..e054524fd1 100644 --- a/routers/admin/users_test.go +++ b/routers/admin/users_test.go @@ -10,6 +10,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/test" + "github.com/stretchr/testify/assert" ) diff --git a/routers/api/v1/admin/org.go b/routers/api/v1/admin/org.go index c90e739626..cdec9e7fad 100644 --- a/routers/api/v1/admin/org.go +++ b/routers/api/v1/admin/org.go @@ -6,10 +6,9 @@ package admin import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/user" ) diff --git a/routers/api/v1/admin/repo.go b/routers/api/v1/admin/repo.go index aaa7957a50..1f64b42238 100644 --- a/routers/api/v1/admin/repo.go +++ b/routers/api/v1/admin/repo.go @@ -5,9 +5,8 @@ package admin import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/context" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/repo" "code.gitea.io/gitea/routers/api/v1/user" ) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index cd308fce51..69dfc89378 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -74,9 +74,9 @@ import ( _ "code.gitea.io/gitea/routers/api/v1/swagger" // for swagger generation "code.gitea.io/gitea/routers/api/v1/user" - "github.com/go-macaron/binding" - "github.com/go-macaron/cors" - macaron "gopkg.in/macaron.v1" + "gitea.com/macaron/binding" + "gitea.com/macaron/cors" + "gitea.com/macaron/macaron" ) func sudo() macaron.Handler { diff --git a/routers/api/v1/convert/convert.go b/routers/api/v1/convert/convert.go index d2691f8238..90202117cc 100644 --- a/routers/api/v1/convert/convert.go +++ b/routers/api/v1/convert/convert.go @@ -15,7 +15,7 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" - "github.com/Unknwon/com" + "github.com/unknwon/com" ) // ToEmail convert models.EmailAddress to api.Email diff --git a/routers/api/v1/misc/markdown.go b/routers/api/v1/misc/markdown.go index b00b00c499..23f0b168d0 100644 --- a/routers/api/v1/misc/markdown.go +++ b/routers/api/v1/misc/markdown.go @@ -8,11 +8,10 @@ import ( "net/http" "strings" - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" "mvdan.cc/xurls/v2" diff --git a/routers/api/v1/misc/markdown_test.go b/routers/api/v1/misc/markdown_test.go index 6cb6b92f9f..47e99d2f06 100644 --- a/routers/api/v1/misc/markdown_test.go +++ b/routers/api/v1/misc/markdown_test.go @@ -13,9 +13,9 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" - "github.com/go-macaron/inject" + "gitea.com/macaron/inject" + "gitea.com/macaron/macaron" "github.com/stretchr/testify/assert" - macaron "gopkg.in/macaron.v1" ) const AppURL = "http://localhost:3000/" diff --git a/routers/api/v1/org/hook.go b/routers/api/v1/org/hook.go index 128cfec328..3f391e4b2b 100644 --- a/routers/api/v1/org/hook.go +++ b/routers/api/v1/org/hook.go @@ -5,10 +5,9 @@ package org import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/utils" ) diff --git a/routers/api/v1/org/member.go b/routers/api/v1/org/member.go index 4ada2d6ef6..370536d22f 100644 --- a/routers/api/v1/org/member.go +++ b/routers/api/v1/org/member.go @@ -7,11 +7,10 @@ package org import ( "fmt" - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/user" ) diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index 2893887a4b..3adc204d3b 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -6,10 +6,9 @@ package org import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/user" ) diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index 59a000b670..3357c07251 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -6,10 +6,9 @@ package org import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/user" ) diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go index 1aaae8723b..670123a858 100644 --- a/routers/api/v1/repo/branch.go +++ b/routers/api/v1/repo/branch.go @@ -8,9 +8,8 @@ package repo import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/routers/api/v1/convert" - api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/routers/api/v1/convert" ) // GetBranch get a branch of a repository diff --git a/routers/api/v1/repo/collaborators.go b/routers/api/v1/repo/collaborators.go index 3ba03e054c..132652e2a9 100644 --- a/routers/api/v1/repo/collaborators.go +++ b/routers/api/v1/repo/collaborators.go @@ -10,7 +10,6 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" - api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" ) diff --git a/routers/api/v1/repo/fork.go b/routers/api/v1/repo/fork.go index c004544f58..7231daab29 100644 --- a/routers/api/v1/repo/fork.go +++ b/routers/api/v1/repo/fork.go @@ -7,7 +7,6 @@ package repo import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" - api "code.gitea.io/gitea/modules/structs" ) diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index 8595be335b..402da82f07 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -16,10 +16,9 @@ import ( issue_indexer "code.gitea.io/gitea/modules/indexer/issues" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" - - api "code.gitea.io/gitea/modules/structs" ) // ListIssues list the issues of a repository diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go index 14e81222e3..18fa1d3eb2 100644 --- a/routers/api/v1/repo/issue_comment.go +++ b/routers/api/v1/repo/issue_comment.go @@ -11,7 +11,6 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/notification" - api "code.gitea.io/gitea/modules/structs" ) diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go index 7c22e6885c..e66bc35e90 100644 --- a/routers/api/v1/repo/issue_label.go +++ b/routers/api/v1/repo/issue_label.go @@ -8,7 +8,6 @@ package repo import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" - api "code.gitea.io/gitea/modules/structs" ) diff --git a/routers/api/v1/repo/issue_tracked_time.go b/routers/api/v1/repo/issue_tracked_time.go index 194f7d32ce..c38ea05c36 100644 --- a/routers/api/v1/repo/issue_tracked_time.go +++ b/routers/api/v1/repo/issue_tracked_time.go @@ -7,7 +7,6 @@ package repo import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" - api "code.gitea.io/gitea/modules/structs" ) diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go index 59782d05f6..42bf024a5f 100644 --- a/routers/api/v1/repo/key.go +++ b/routers/api/v1/repo/key.go @@ -10,9 +10,8 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/routers/api/v1/convert" - api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/routers/api/v1/convert" ) // appendPrivateInformation appends the owner and key type information to api.PublicKey diff --git a/routers/api/v1/repo/label.go b/routers/api/v1/repo/label.go index 98ccee37bd..33574c481e 100644 --- a/routers/api/v1/repo/label.go +++ b/routers/api/v1/repo/label.go @@ -10,7 +10,6 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" - api "code.gitea.io/gitea/modules/structs" ) diff --git a/routers/api/v1/repo/release.go b/routers/api/v1/repo/release.go index 0fdcfa355c..9296f22e80 100644 --- a/routers/api/v1/repo/release.go +++ b/routers/api/v1/repo/release.go @@ -8,7 +8,6 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" - api "code.gitea.io/gitea/modules/structs" ) diff --git a/routers/api/v1/repo/release_attachment.go b/routers/api/v1/repo/release_attachment.go index d0eb3d4ae1..67802fd9e7 100644 --- a/routers/api/v1/repo/release_attachment.go +++ b/routers/api/v1/repo/release_attachment.go @@ -10,9 +10,8 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/upload" - api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/upload" ) // GetReleaseAttachment gets a single attachment of the release diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 8d7e43edff..5fe41927fa 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -17,10 +17,9 @@ import ( "code.gitea.io/gitea/modules/migrations" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/routers/api/v1/convert" - - api "code.gitea.io/gitea/modules/structs" ) var searchOrderByMap = map[string]map[string]models.SearchOrderBy{ diff --git a/routers/api/v1/repo/star.go b/routers/api/v1/repo/star.go index 1b2ef0b027..2eb5daeced 100644 --- a/routers/api/v1/repo/star.go +++ b/routers/api/v1/repo/star.go @@ -6,7 +6,6 @@ package repo import ( "code.gitea.io/gitea/modules/context" - api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" ) diff --git a/routers/api/v1/repo/status.go b/routers/api/v1/repo/status.go index b3d16e79bc..48edd22910 100644 --- a/routers/api/v1/repo/status.go +++ b/routers/api/v1/repo/status.go @@ -10,7 +10,6 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/repofiles" - api "code.gitea.io/gitea/modules/structs" ) diff --git a/routers/api/v1/repo/subscriber.go b/routers/api/v1/repo/subscriber.go index ec0ea6dada..79ad0e0221 100644 --- a/routers/api/v1/repo/subscriber.go +++ b/routers/api/v1/repo/subscriber.go @@ -6,7 +6,6 @@ package repo import ( "code.gitea.io/gitea/modules/context" - api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" ) diff --git a/routers/api/v1/repo/tag.go b/routers/api/v1/repo/tag.go index ecf580e1b0..1753402d3a 100644 --- a/routers/api/v1/repo/tag.go +++ b/routers/api/v1/repo/tag.go @@ -5,11 +5,11 @@ package repo import ( - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/routers/api/v1/convert" "net/http" + "code.gitea.io/gitea/modules/context" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/routers/api/v1/convert" ) // ListTags list all the tags of a repository diff --git a/routers/api/v1/user/app.go b/routers/api/v1/user/app.go index 8e3b476d36..e42a3cb093 100644 --- a/routers/api/v1/user/app.go +++ b/routers/api/v1/user/app.go @@ -6,10 +6,9 @@ package user import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + api "code.gitea.io/gitea/modules/structs" ) // ListAccessTokens list all the access tokens diff --git a/routers/api/v1/user/email.go b/routers/api/v1/user/email.go index 67659cfb0f..027f4e2763 100644 --- a/routers/api/v1/user/email.go +++ b/routers/api/v1/user/email.go @@ -5,11 +5,10 @@ package user import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" ) diff --git a/routers/api/v1/user/follower.go b/routers/api/v1/user/follower.go index 078f30af3c..59df9665f4 100644 --- a/routers/api/v1/user/follower.go +++ b/routers/api/v1/user/follower.go @@ -5,10 +5,9 @@ package user import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" ) diff --git a/routers/api/v1/user/gpg_key.go b/routers/api/v1/user/gpg_key.go index 7bf43c5822..fa85e47a82 100644 --- a/routers/api/v1/user/gpg_key.go +++ b/routers/api/v1/user/gpg_key.go @@ -5,10 +5,9 @@ package user import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" ) diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go index e3d7aa4b3e..8425535b10 100644 --- a/routers/api/v1/user/key.go +++ b/routers/api/v1/user/key.go @@ -5,11 +5,10 @@ package user import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/repo" ) diff --git a/routers/api/v1/user/star.go b/routers/api/v1/user/star.go index e5eec71b60..744e0bf7d5 100644 --- a/routers/api/v1/user/star.go +++ b/routers/api/v1/user/star.go @@ -5,10 +5,9 @@ package user import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + api "code.gitea.io/gitea/modules/structs" ) // getStarredRepos returns the repos that the user with the specified userID has diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index fc3b7a8160..bb1302077b 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -13,7 +13,7 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/convert" - "github.com/Unknwon/com" + "github.com/unknwon/com" ) // Search search users diff --git a/routers/api/v1/user/watch.go b/routers/api/v1/user/watch.go index f0eb95ac1e..87739b15fb 100644 --- a/routers/api/v1/user/watch.go +++ b/routers/api/v1/user/watch.go @@ -5,11 +5,10 @@ package user import ( - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" ) // getWatchedRepos returns the repos that the user with the specified userID is diff --git a/routers/api/v1/utils/hook.go b/routers/api/v1/utils/hook.go index 92846c5f2a..0b00e59ade 100644 --- a/routers/api/v1/utils/hook.go +++ b/routers/api/v1/utils/hook.go @@ -15,7 +15,7 @@ import ( "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/utils" - "github.com/Unknwon/com" + "github.com/unknwon/com" ) // GetOrgHook get an organization's webhook. If there is an error, write to diff --git a/routers/init.go b/routers/init.go index 26d750d20e..4724da8627 100644 --- a/routers/init.go +++ b/routers/init.go @@ -22,7 +22,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/ssh" - macaron "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) func checkRunMode() { diff --git a/routers/install.go b/routers/install.go index c95abebea7..6d29bcf887 100644 --- a/routers/install.go +++ b/routers/install.go @@ -11,10 +11,6 @@ import ( "path/filepath" "strings" - "github.com/Unknwon/com" - "github.com/go-xorm/xorm" - "gopkg.in/ini.v1" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" @@ -23,6 +19,10 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/user" + + "github.com/go-xorm/xorm" + "github.com/unknwon/com" + "gopkg.in/ini.v1" ) const ( diff --git a/routers/metrics.go b/routers/metrics.go index b7711dfced..f2381c2745 100644 --- a/routers/metrics.go +++ b/routers/metrics.go @@ -7,10 +7,10 @@ package routers import ( "crypto/subtle" - "github.com/prometheus/client_golang/prometheus/promhttp" - "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" + + "github.com/prometheus/client_golang/prometheus/promhttp" ) // Metrics validate auth token and render prometheus metrics diff --git a/routers/org/members.go b/routers/org/members.go index 20f80cefcd..f9cb275e83 100644 --- a/routers/org/members.go +++ b/routers/org/members.go @@ -5,13 +5,13 @@ package org import ( - "github.com/Unknwon/com" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + + "github.com/unknwon/com" ) const ( diff --git a/routers/org/teams.go b/routers/org/teams.go index f662bd92e2..7ead6ea5ff 100644 --- a/routers/org/teams.go +++ b/routers/org/teams.go @@ -9,14 +9,14 @@ import ( "path" "strings" - "github.com/Unknwon/com" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/routers/utils" + + "github.com/unknwon/com" ) const ( diff --git a/routers/private/hook.go b/routers/private/hook.go index ee77a00321..1f6ab2f673 100644 --- a/routers/private/hook.go +++ b/routers/private/hook.go @@ -18,7 +18,7 @@ import ( "code.gitea.io/gitea/modules/repofiles" "code.gitea.io/gitea/modules/util" - macaron "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) // HookPreReceive checks whether a individual commit is acceptable diff --git a/routers/private/internal.go b/routers/private/internal.go index 11cea8b4b9..3a48f5384d 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -11,7 +11,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/setting" - macaron "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) // CheckInternalToken check internal token is set diff --git a/routers/private/key.go b/routers/private/key.go index 8c1dbd40f1..dcf597d6ba 100644 --- a/routers/private/key.go +++ b/routers/private/key.go @@ -9,7 +9,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/timeutil" - macaron "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) // UpdatePublicKeyInRepo update public key and deploy key updates diff --git a/routers/private/push_update.go b/routers/private/push_update.go index 733490ce1c..42eda3178b 100644 --- a/routers/private/push_update.go +++ b/routers/private/push_update.go @@ -13,7 +13,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/repofiles" - macaron "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) // PushUpdate update public key updates diff --git a/routers/private/serv.go b/routers/private/serv.go index 90579a3dcc..71c0f6ea2c 100644 --- a/routers/private/serv.go +++ b/routers/private/serv.go @@ -15,7 +15,7 @@ import ( "code.gitea.io/gitea/modules/private" "code.gitea.io/gitea/modules/setting" - macaron "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) // ServNoCommand returns information about the provided keyid diff --git a/routers/repo/editor_test.go b/routers/repo/editor_test.go index 7a68ecc9b7..ca00be74b7 100644 --- a/routers/repo/editor_test.go +++ b/routers/repo/editor_test.go @@ -5,11 +5,11 @@ package repo import ( - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/test" "testing" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/test" "github.com/stretchr/testify/assert" ) diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 72e0357e6c..564a0eab09 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -27,7 +27,7 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" - "github.com/Unknwon/com" + "github.com/unknwon/com" ) const ( diff --git a/routers/repo/pull.go b/routers/repo/pull.go index cb4fa9547e..01a57f04e4 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -25,7 +25,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" - "github.com/Unknwon/com" + "github.com/unknwon/com" ) const ( diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 8c63d73b38..53244f304c 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -21,7 +21,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" - "github.com/Unknwon/com" + "github.com/unknwon/com" ) const ( diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 38c6ecf56e..3dc5a1e099 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -25,7 +25,7 @@ import ( "code.gitea.io/gitea/modules/validation" "code.gitea.io/gitea/routers/utils" - "github.com/Unknwon/com" + "github.com/unknwon/com" "mvdan.cc/xurls/v2" ) diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go index 20a3a45c18..d523fd9e87 100644 --- a/routers/repo/webhook.go +++ b/routers/repo/webhook.go @@ -20,7 +20,7 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" - "github.com/Unknwon/com" + "github.com/unknwon/com" ) const ( diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 6169aa563c..5774c65eca 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -38,16 +38,16 @@ import ( // to registers all internal adapters _ "code.gitea.io/gitea/modules/session" - "github.com/go-macaron/binding" - "github.com/go-macaron/cache" - "github.com/go-macaron/captcha" - "github.com/go-macaron/csrf" - "github.com/go-macaron/i18n" - "github.com/go-macaron/session" - "github.com/go-macaron/toolbox" + "gitea.com/macaron/binding" + "gitea.com/macaron/cache" + "gitea.com/macaron/captcha" + "gitea.com/macaron/csrf" + "gitea.com/macaron/i18n" + "gitea.com/macaron/macaron" + "gitea.com/macaron/session" + "gitea.com/macaron/toolbox" "github.com/prometheus/client_golang/prometheus" "github.com/tstranex/u2f" - macaron "gopkg.in/macaron.v1" ) type routerLoggerOptions struct { diff --git a/routers/user/auth.go b/routers/user/auth.go index 6850bbe11b..11d642b147 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -22,7 +22,7 @@ import ( "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" - "github.com/go-macaron/captcha" + "gitea.com/macaron/captcha" "github.com/markbates/goth" "github.com/tstranex/u2f" ) diff --git a/routers/user/auth_openid.go b/routers/user/auth_openid.go index 48dbf02ffb..832766b16c 100644 --- a/routers/user/auth_openid.go +++ b/routers/user/auth_openid.go @@ -19,7 +19,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" - "github.com/go-macaron/captcha" + "gitea.com/macaron/captcha" ) const ( diff --git a/routers/user/home.go b/routers/user/home.go index 9ccd5bdb26..adf47d289c 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -18,9 +18,9 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" - "github.com/Unknwon/com" "github.com/keybase/go-crypto/openpgp" "github.com/keybase/go-crypto/openpgp/armor" + "github.com/unknwon/com" ) const ( diff --git a/routers/user/home_test.go b/routers/user/home_test.go index 8a3d9b9f51..9d4136ac8c 100644 --- a/routers/user/home_test.go +++ b/routers/user/home_test.go @@ -9,9 +9,9 @@ import ( "testing" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" - "code.gitea.io/gitea/modules/setting" "github.com/stretchr/testify/assert" ) diff --git a/routers/user/oauth.go b/routers/user/oauth.go index 19add5e647..d4dcb857fa 100644 --- a/routers/user/oauth.go +++ b/routers/user/oauth.go @@ -18,8 +18,8 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" + "gitea.com/macaron/binding" "github.com/dgrijalva/jwt-go" - "github.com/go-macaron/binding" ) const ( diff --git a/routers/user/setting/profile.go b/routers/user/setting/profile.go index 64828e90ee..6db9fc7c6e 100644 --- a/routers/user/setting/profile.go +++ b/routers/user/setting/profile.go @@ -18,8 +18,8 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "github.com/Unknwon/com" - "github.com/Unknwon/i18n" + "github.com/unknwon/com" + "github.com/unknwon/i18n" ) const ( |