summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Loibl <mail@matthiasloibl.com>2016-11-05 23:08:29 +0100
committerGitHub <noreply@github.com>2016-11-05 23:08:29 +0100
commit92f39da8026a10eea39caa000503e91bf8834853 (patch)
tree46513d09162e3715d69a015da9cf7f225dc9c6b5
parenta0e54c0512a764ab0f93eb2ee6b978fb736190b4 (diff)
parentf36544f98db4a210195f7d0f9019d64d9dff72f3 (diff)
downloadgitea-92f39da8026a10eea39caa000503e91bf8834853.tar.gz
gitea-92f39da8026a10eea39caa000503e91bf8834853.zip
Merge pull request #85 from metalmatze/feature/goimports
Fix imports found by goimports.
-rw-r--r--cmd/web.go32
-rw-r--r--models/git_diff.go10
-rw-r--r--models/pull.go8
-rw-r--r--models/repo.go12
-rw-r--r--modules/auth/repo_form.go5
-rw-r--r--modules/context/api.go3
-rw-r--r--modules/context/auth.go5
-rw-r--r--modules/context/context.go11
-rw-r--r--modules/context/org.go3
-rw-r--r--modules/context/repo.go8
-rw-r--r--routers/repo/commit.go4
-rw-r--r--routers/repo/editor.go2
-rw-r--r--routers/repo/middlewares.go2
-rw-r--r--routers/repo/pull.go4
-rw-r--r--routers/repo/view.go4
15 files changed, 46 insertions, 67 deletions
diff --git a/cmd/web.go b/cmd/web.go
index d80c2096c5..580fae1cb6 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 e3d5df2648..d5a6cf7daa 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 f582adccb0..2828c48a0d 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 990670940f..848d108eb6 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 b25612b3c1..bd5c49c77e 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 62be56d320..dfd9a57818 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 807183e452..8ed8162de7 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 82e3cbf27b..9395880d02 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 880554a4b1..3804e210e6 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 e4c2c597c5..82662b00de 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 041247939c..fff88380ec 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 bc0359b8ab..c26f033c6e 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 7e1f95d417..2d0ebe1039 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 62162af67b..c57a03153c 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 e8b8d1e002..0e082b52ea 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 (