From ddee4c8b5853d876ebd45ea4e7fe56208cd30eb5 Mon Sep 17 00:00:00 2001 From: Thibault Meyer Date: Fri, 11 Nov 2016 13:11:45 +0100 Subject: [PATCH] Normalize files with gofmt --- models/git_diff.go | 4 ++-- models/issue.go | 2 +- models/pull.go | 6 +++--- models/repo.go | 8 ++++---- modules/auth/repo_form.go | 2 +- modules/base/tool.go | 4 ++-- modules/context/api.go | 2 +- modules/context/repo.go | 4 ++-- routers/repo/commit.go | 2 +- routers/repo/editor.go | 2 +- routers/repo/middlewares.go | 2 +- routers/repo/pull.go | 4 ++-- routers/repo/release.go | 2 +- routers/repo/view.go | 4 ++-- routers/user/auth.go | 4 ++-- 15 files changed, 26 insertions(+), 26 deletions(-) diff --git a/models/git_diff.go b/models/git_diff.go index 7aff1f53e1..7d4f5db7f5 100644 --- a/models/git_diff.go +++ b/models/git_diff.go @@ -16,13 +16,13 @@ import ( "os/exec" "strings" - "github.com/Unknwon/com" + "code.gitea.io/git" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/template/highlight" - "code.gitea.io/git" + "github.com/Unknwon/com" "github.com/sergi/go-diff/diffmatchpatch" "golang.org/x/net/html/charset" "golang.org/x/text/transform" diff --git a/models/issue.go b/models/issue.go index 67ee14cb93..16766fc6c3 100644 --- a/models/issue.go +++ b/models/issue.go @@ -14,9 +14,9 @@ import ( "strings" "time" + api "code.gitea.io/sdk/gitea" "github.com/Unknwon/com" "github.com/go-xorm/xorm" - api "code.gitea.io/sdk/gitea" gouuid "github.com/satori/go.uuid" "code.gitea.io/gitea/modules/base" diff --git a/models/pull.go b/models/pull.go index 98b9c96059..4b7034ce4d 100644 --- a/models/pull.go +++ b/models/pull.go @@ -11,14 +11,14 @@ import ( "strings" "time" - "github.com/Unknwon/com" + "code.gitea.io/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/sync" - "github.com/go-xorm/xorm" - "code.gitea.io/git" api "code.gitea.io/sdk/gitea" + "github.com/Unknwon/com" + "github.com/go-xorm/xorm" ) var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength) diff --git a/models/repo.go b/models/repo.go index 7d976cfa7b..844fca9a3a 100644 --- a/models/repo.go +++ b/models/repo.go @@ -19,17 +19,17 @@ import ( "strings" "time" - "github.com/Unknwon/cae/zip" - "github.com/Unknwon/com" + "code.gitea.io/git" "code.gitea.io/gitea/modules/bindata" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markdown" "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/sync" - "github.com/go-xorm/xorm" - "code.gitea.io/git" api "code.gitea.io/sdk/gitea" + "github.com/Unknwon/cae/zip" + "github.com/Unknwon/com" + "github.com/go-xorm/xorm" version "github.com/mcuadros/go-version" ini "gopkg.in/ini.v1" ) diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index a8fd06ae46..1f5330d23a 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -8,8 +8,8 @@ import ( "net/url" "strings" - "github.com/Unknwon/com" "code.gitea.io/gitea/models" + "github.com/Unknwon/com" "github.com/go-macaron/binding" macaron "gopkg.in/macaron.v1" ) diff --git a/modules/base/tool.go b/modules/base/tool.go index 5b907a0fdd..bacdeb2924 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -22,10 +22,10 @@ import ( "unicode" "unicode/utf8" - "github.com/Unknwon/com" - "github.com/Unknwon/i18n" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "github.com/Unknwon/com" + "github.com/Unknwon/i18n" "github.com/gogits/chardet" ) diff --git a/modules/context/api.go b/modules/context/api.go index d5041a1ec3..197fbd6df1 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -8,10 +8,10 @@ import ( "fmt" "strings" - "github.com/Unknwon/paginater" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "github.com/Unknwon/paginater" macaron "gopkg.in/macaron.v1" ) diff --git a/modules/context/repo.go b/modules/context/repo.go index d9d97d7a93..db808d743e 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -10,11 +10,11 @@ import ( "path" "strings" - "github.com/Unknwon/com" + "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/git" + "github.com/Unknwon/com" editorconfig "gopkg.in/editorconfig/editorconfig-core-go.v1" macaron "gopkg.in/macaron.v1" ) diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 0f5145a752..e3170b053d 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -8,12 +8,12 @@ import ( "container/list" "path" - "github.com/Unknwon/paginater" "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" + "github.com/Unknwon/paginater" ) const ( diff --git a/routers/repo/editor.go b/routers/repo/editor.go index ed5cbd4408..fca5430173 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -11,6 +11,7 @@ import ( "path" "strings" + "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" @@ -18,7 +19,6 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/template" - "code.gitea.io/git" ) const ( diff --git a/routers/repo/middlewares.go b/routers/repo/middlewares.go index 5ffa100bff..94e007cd20 100644 --- a/routers/repo/middlewares.go +++ b/routers/repo/middlewares.go @@ -3,9 +3,9 @@ package repo import ( "fmt" + "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" - "code.gitea.io/git" ) func SetEditorconfigIfExists(ctx *context.Context) { diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 117b5684ec..83352d7f3c 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -10,14 +10,14 @@ import ( "path" "strings" - "github.com/Unknwon/com" + "code.gitea.io/git" "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/modules/setting" - "code.gitea.io/git" + "github.com/Unknwon/com" ) const ( diff --git a/routers/repo/release.go b/routers/repo/release.go index 7010c832a0..3c49663830 100644 --- a/routers/repo/release.go +++ b/routers/repo/release.go @@ -7,13 +7,13 @@ package repo import ( "fmt" - "github.com/Unknwon/paginater" "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/modules/markdown" + "github.com/Unknwon/paginater" ) const ( diff --git a/routers/repo/view.go b/routers/repo/view.go index d67ee9540f..8f49a12c32 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -12,7 +12,7 @@ import ( "path" "strings" - "github.com/Unknwon/paginater" + "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" @@ -21,7 +21,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/template" "code.gitea.io/gitea/modules/template/highlight" - "code.gitea.io/git" + "github.com/Unknwon/paginater" ) const ( diff --git a/routers/user/auth.go b/routers/user/auth.go index 21c301321f..69f1db47b3 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -130,8 +130,8 @@ func SignInPost(ctx *context.Context, form auth.SignInForm) { // Register last login u.SetLastLogin() if err := models.UpdateUser(u); err != nil { - ctx.Handle(500, "UpdateUser", err) - return + ctx.Handle(500, "UpdateUser", err) + return } if redirectTo, _ := url.QueryUnescape(ctx.GetCookie("redirect_to")); len(redirectTo) > 0 {