diff --git a/cmd/web.go b/cmd/web.go index d80c2096c54..580fae1cb61 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -15,23 +15,6 @@ import ( "path" "strings" - "github.com/go-macaron/binding" - "github.com/go-macaron/cache" - "github.com/go-macaron/captcha" - "github.com/go-macaron/csrf" - "github.com/go-macaron/gzip" - "github.com/go-macaron/i18n" - "github.com/go-macaron/session" - "github.com/go-macaron/toolbox" - "github.com/go-xorm/xorm" - "github.com/mcuadros/go-version" - "github.com/urfave/cli" - "gopkg.in/ini.v1" - "gopkg.in/macaron.v1" - - "github.com/gogits/git-module" - "github.com/gogits/go-gogs-client" - "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/auth" "github.com/go-gitea/gitea/modules/bindata" @@ -46,6 +29,21 @@ import ( "github.com/go-gitea/gitea/routers/org" "github.com/go-gitea/gitea/routers/repo" "github.com/go-gitea/gitea/routers/user" + "github.com/go-macaron/binding" + "github.com/go-macaron/cache" + "github.com/go-macaron/captcha" + "github.com/go-macaron/csrf" + "github.com/go-macaron/gzip" + "github.com/go-macaron/i18n" + "github.com/go-macaron/session" + "github.com/go-macaron/toolbox" + "github.com/go-xorm/xorm" + git "github.com/gogits/git-module" + gogs "github.com/gogits/go-gogs-client" + version "github.com/mcuadros/go-version" + "github.com/urfave/cli" + ini "gopkg.in/ini.v1" + macaron "gopkg.in/macaron.v1" ) // CmdWeb represents the available web sub-command. diff --git a/models/git_diff.go b/models/git_diff.go index e3d5df26481..d5a6cf7daad 100644 --- a/models/git_diff.go +++ b/models/git_diff.go @@ -17,17 +17,15 @@ import ( "strings" "github.com/Unknwon/com" - "github.com/sergi/go-diff/diffmatchpatch" - "golang.org/x/net/html/charset" - "golang.org/x/text/transform" - - "github.com/gogits/git-module" - "github.com/go-gitea/gitea/modules/base" "github.com/go-gitea/gitea/modules/log" "github.com/go-gitea/gitea/modules/process" "github.com/go-gitea/gitea/modules/setting" "github.com/go-gitea/gitea/modules/template/highlight" + git "github.com/gogits/git-module" + "github.com/sergi/go-diff/diffmatchpatch" + "golang.org/x/net/html/charset" + "golang.org/x/text/transform" ) type DiffLineType uint8 diff --git a/models/pull.go b/models/pull.go index f582adccb0b..2828c48a0d1 100644 --- a/models/pull.go +++ b/models/pull.go @@ -12,15 +12,13 @@ import ( "time" "github.com/Unknwon/com" - "github.com/go-xorm/xorm" - - "github.com/gogits/git-module" - api "github.com/gogits/go-gogs-client" - "github.com/go-gitea/gitea/modules/log" "github.com/go-gitea/gitea/modules/process" "github.com/go-gitea/gitea/modules/setting" "github.com/go-gitea/gitea/modules/sync" + "github.com/go-xorm/xorm" + git "github.com/gogits/git-module" + api "github.com/gogits/go-gogs-client" ) var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength) diff --git a/models/repo.go b/models/repo.go index 990670940f0..848d108eb66 100644 --- a/models/repo.go +++ b/models/repo.go @@ -21,19 +21,17 @@ import ( "github.com/Unknwon/cae/zip" "github.com/Unknwon/com" - "github.com/go-xorm/xorm" - "github.com/mcuadros/go-version" - "gopkg.in/ini.v1" - - git "github.com/gogits/git-module" - api "github.com/gogits/go-gogs-client" - "github.com/go-gitea/gitea/modules/bindata" "github.com/go-gitea/gitea/modules/log" "github.com/go-gitea/gitea/modules/markdown" "github.com/go-gitea/gitea/modules/process" "github.com/go-gitea/gitea/modules/setting" "github.com/go-gitea/gitea/modules/sync" + "github.com/go-xorm/xorm" + git "github.com/gogits/git-module" + api "github.com/gogits/go-gogs-client" + version "github.com/mcuadros/go-version" + ini "gopkg.in/ini.v1" ) const ( diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index b25612b3c19..bd5c49c77ec 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -9,10 +9,9 @@ import ( "strings" "github.com/Unknwon/com" - "github.com/go-macaron/binding" - "gopkg.in/macaron.v1" - "github.com/go-gitea/gitea/models" + "github.com/go-macaron/binding" + macaron "gopkg.in/macaron.v1" ) // _______________________________________ _________.______________________ _______________.___. diff --git a/modules/context/api.go b/modules/context/api.go index 62be56d320e..dfd9a578187 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -9,11 +9,10 @@ import ( "strings" "github.com/Unknwon/paginater" - "gopkg.in/macaron.v1" - "github.com/go-gitea/gitea/modules/base" "github.com/go-gitea/gitea/modules/log" "github.com/go-gitea/gitea/modules/setting" + macaron "gopkg.in/macaron.v1" ) type APIContext struct { diff --git a/modules/context/auth.go b/modules/context/auth.go index 807183e4528..8ed8162de7e 100644 --- a/modules/context/auth.go +++ b/modules/context/auth.go @@ -7,11 +7,10 @@ package context import ( "net/url" - "github.com/go-macaron/csrf" - "gopkg.in/macaron.v1" - "github.com/go-gitea/gitea/modules/auth" "github.com/go-gitea/gitea/modules/setting" + "github.com/go-macaron/csrf" + macaron "gopkg.in/macaron.v1" ) type ToggleOptions struct { diff --git a/modules/context/context.go b/modules/context/context.go index 82e3cbf27bd..9395880d022 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -12,17 +12,16 @@ import ( "strings" "time" - "github.com/go-macaron/cache" - "github.com/go-macaron/csrf" - "github.com/go-macaron/i18n" - "github.com/go-macaron/session" - "gopkg.in/macaron.v1" - "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/auth" "github.com/go-gitea/gitea/modules/base" "github.com/go-gitea/gitea/modules/log" "github.com/go-gitea/gitea/modules/setting" + "github.com/go-macaron/cache" + "github.com/go-macaron/csrf" + "github.com/go-macaron/i18n" + "github.com/go-macaron/session" + macaron "gopkg.in/macaron.v1" ) // Context represents context of a request. diff --git a/modules/context/org.go b/modules/context/org.go index 880554a4b1b..3804e210e6b 100644 --- a/modules/context/org.go +++ b/modules/context/org.go @@ -7,10 +7,9 @@ package context import ( "strings" - "gopkg.in/macaron.v1" - "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/setting" + macaron "gopkg.in/macaron.v1" ) type Organization struct { diff --git a/modules/context/repo.go b/modules/context/repo.go index e4c2c597c5e..82662b00de2 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -11,14 +11,12 @@ import ( "strings" "github.com/Unknwon/com" - "gopkg.in/editorconfig/editorconfig-core-go.v1" - "gopkg.in/macaron.v1" - - "github.com/gogits/git-module" - "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/log" "github.com/go-gitea/gitea/modules/setting" + git "github.com/gogits/git-module" + editorconfig "gopkg.in/editorconfig/editorconfig-core-go.v1" + macaron "gopkg.in/macaron.v1" ) type PullRequest struct { diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 041247939c3..fff88380ec8 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -9,13 +9,11 @@ import ( "path" "github.com/Unknwon/paginater" - - "github.com/gogits/git-module" - "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/base" "github.com/go-gitea/gitea/modules/context" "github.com/go-gitea/gitea/modules/setting" + git "github.com/gogits/git-module" ) const ( diff --git a/routers/repo/editor.go b/routers/repo/editor.go index bc0359b8ab0..c26f033c6ed 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -18,7 +18,7 @@ import ( "github.com/go-gitea/gitea/modules/log" "github.com/go-gitea/gitea/modules/setting" "github.com/go-gitea/gitea/modules/template" - "github.com/gogits/git-module" + git "github.com/gogits/git-module" ) const ( diff --git a/routers/repo/middlewares.go b/routers/repo/middlewares.go index 7e1f95d4171..2d0ebe1039a 100644 --- a/routers/repo/middlewares.go +++ b/routers/repo/middlewares.go @@ -5,7 +5,7 @@ import ( "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/context" - "github.com/gogits/git-module" + git "github.com/gogits/git-module" ) func SetEditorconfigIfExists(ctx *context.Context) { diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 62162af67bb..c57a03153cc 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -11,15 +11,13 @@ import ( "strings" "github.com/Unknwon/com" - - "github.com/gogits/git-module" - "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/auth" "github.com/go-gitea/gitea/modules/base" "github.com/go-gitea/gitea/modules/context" "github.com/go-gitea/gitea/modules/log" "github.com/go-gitea/gitea/modules/setting" + git "github.com/gogits/git-module" ) const ( diff --git a/routers/repo/view.go b/routers/repo/view.go index e8b8d1e0020..0e082b52eac 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -13,9 +13,6 @@ import ( "strings" "github.com/Unknwon/paginater" - - "github.com/gogits/git-module" - "github.com/go-gitea/gitea/models" "github.com/go-gitea/gitea/modules/base" "github.com/go-gitea/gitea/modules/context" @@ -24,6 +21,7 @@ import ( "github.com/go-gitea/gitea/modules/setting" "github.com/go-gitea/gitea/modules/template" "github.com/go-gitea/gitea/modules/template/highlight" + git "github.com/gogits/git-module" ) const (