Browse Source

Normalize files with gofmt

Thibault Meyer 3 years ago
parent
commit
ddee4c8b58

+ 2 - 2
models/git_diff.go

@@ -16,13 +16,13 @@ import (
16 16
 	"os/exec"
17 17
 	"strings"
18 18
 
19
-	"github.com/Unknwon/com"
19
+	"code.gitea.io/git"
20 20
 	"code.gitea.io/gitea/modules/base"
21 21
 	"code.gitea.io/gitea/modules/log"
22 22
 	"code.gitea.io/gitea/modules/process"
23 23
 	"code.gitea.io/gitea/modules/setting"
24 24
 	"code.gitea.io/gitea/modules/template/highlight"
25
-	"code.gitea.io/git"
25
+	"github.com/Unknwon/com"
26 26
 	"github.com/sergi/go-diff/diffmatchpatch"
27 27
 	"golang.org/x/net/html/charset"
28 28
 	"golang.org/x/text/transform"

+ 1 - 1
models/issue.go

@@ -14,9 +14,9 @@ import (
14 14
 	"strings"
15 15
 	"time"
16 16
 
17
+	api "code.gitea.io/sdk/gitea"
17 18
 	"github.com/Unknwon/com"
18 19
 	"github.com/go-xorm/xorm"
19
-	api "code.gitea.io/sdk/gitea"
20 20
 	gouuid "github.com/satori/go.uuid"
21 21
 
22 22
 	"code.gitea.io/gitea/modules/base"

+ 3 - 3
models/pull.go

@@ -11,14 +11,14 @@ import (
11 11
 	"strings"
12 12
 	"time"
13 13
 
14
-	"github.com/Unknwon/com"
14
+	"code.gitea.io/git"
15 15
 	"code.gitea.io/gitea/modules/log"
16 16
 	"code.gitea.io/gitea/modules/process"
17 17
 	"code.gitea.io/gitea/modules/setting"
18 18
 	"code.gitea.io/gitea/modules/sync"
19
-	"github.com/go-xorm/xorm"
20
-	"code.gitea.io/git"
21 19
 	api "code.gitea.io/sdk/gitea"
20
+	"github.com/Unknwon/com"
21
+	"github.com/go-xorm/xorm"
22 22
 )
23 23
 
24 24
 var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength)

+ 4 - 4
models/repo.go

@@ -19,17 +19,17 @@ import (
19 19
 	"strings"
20 20
 	"time"
21 21
 
22
-	"github.com/Unknwon/cae/zip"
23
-	"github.com/Unknwon/com"
22
+	"code.gitea.io/git"
24 23
 	"code.gitea.io/gitea/modules/bindata"
25 24
 	"code.gitea.io/gitea/modules/log"
26 25
 	"code.gitea.io/gitea/modules/markdown"
27 26
 	"code.gitea.io/gitea/modules/process"
28 27
 	"code.gitea.io/gitea/modules/setting"
29 28
 	"code.gitea.io/gitea/modules/sync"
30
-	"github.com/go-xorm/xorm"
31
-	"code.gitea.io/git"
32 29
 	api "code.gitea.io/sdk/gitea"
30
+	"github.com/Unknwon/cae/zip"
31
+	"github.com/Unknwon/com"
32
+	"github.com/go-xorm/xorm"
33 33
 	version "github.com/mcuadros/go-version"
34 34
 	ini "gopkg.in/ini.v1"
35 35
 )

+ 1 - 1
modules/auth/repo_form.go

@@ -8,8 +8,8 @@ import (
8 8
 	"net/url"
9 9
 	"strings"
10 10
 
11
-	"github.com/Unknwon/com"
12 11
 	"code.gitea.io/gitea/models"
12
+	"github.com/Unknwon/com"
13 13
 	"github.com/go-macaron/binding"
14 14
 	macaron "gopkg.in/macaron.v1"
15 15
 )

+ 2 - 2
modules/base/tool.go

@@ -22,10 +22,10 @@ import (
22 22
 	"unicode"
23 23
 	"unicode/utf8"
24 24
 
25
-	"github.com/Unknwon/com"
26
-	"github.com/Unknwon/i18n"
27 25
 	"code.gitea.io/gitea/modules/log"
28 26
 	"code.gitea.io/gitea/modules/setting"
27
+	"github.com/Unknwon/com"
28
+	"github.com/Unknwon/i18n"
29 29
 	"github.com/gogits/chardet"
30 30
 )
31 31
 

+ 1 - 1
modules/context/api.go

@@ -8,10 +8,10 @@ import (
8 8
 	"fmt"
9 9
 	"strings"
10 10
 
11
-	"github.com/Unknwon/paginater"
12 11
 	"code.gitea.io/gitea/modules/base"
13 12
 	"code.gitea.io/gitea/modules/log"
14 13
 	"code.gitea.io/gitea/modules/setting"
14
+	"github.com/Unknwon/paginater"
15 15
 	macaron "gopkg.in/macaron.v1"
16 16
 )
17 17
 

+ 2 - 2
modules/context/repo.go

@@ -10,11 +10,11 @@ import (
10 10
 	"path"
11 11
 	"strings"
12 12
 
13
-	"github.com/Unknwon/com"
13
+	"code.gitea.io/git"
14 14
 	"code.gitea.io/gitea/models"
15 15
 	"code.gitea.io/gitea/modules/log"
16 16
 	"code.gitea.io/gitea/modules/setting"
17
-	"code.gitea.io/git"
17
+	"github.com/Unknwon/com"
18 18
 	editorconfig "gopkg.in/editorconfig/editorconfig-core-go.v1"
19 19
 	macaron "gopkg.in/macaron.v1"
20 20
 )

+ 1 - 1
routers/repo/commit.go

@@ -8,12 +8,12 @@ import (
8 8
 	"container/list"
9 9
 	"path"
10 10
 
11
-	"github.com/Unknwon/paginater"
12 11
 	"code.gitea.io/git"
13 12
 	"code.gitea.io/gitea/models"
14 13
 	"code.gitea.io/gitea/modules/base"
15 14
 	"code.gitea.io/gitea/modules/context"
16 15
 	"code.gitea.io/gitea/modules/setting"
16
+	"github.com/Unknwon/paginater"
17 17
 )
18 18
 
19 19
 const (

+ 1 - 1
routers/repo/editor.go

@@ -11,6 +11,7 @@ import (
11 11
 	"path"
12 12
 	"strings"
13 13
 
14
+	"code.gitea.io/git"
14 15
 	"code.gitea.io/gitea/models"
15 16
 	"code.gitea.io/gitea/modules/auth"
16 17
 	"code.gitea.io/gitea/modules/base"
@@ -18,7 +19,6 @@ import (
18 19
 	"code.gitea.io/gitea/modules/log"
19 20
 	"code.gitea.io/gitea/modules/setting"
20 21
 	"code.gitea.io/gitea/modules/template"
21
-	"code.gitea.io/git"
22 22
 )
23 23
 
24 24
 const (

+ 1 - 1
routers/repo/middlewares.go

@@ -3,9 +3,9 @@ package repo
3 3
 import (
4 4
 	"fmt"
5 5
 
6
+	"code.gitea.io/git"
6 7
 	"code.gitea.io/gitea/models"
7 8
 	"code.gitea.io/gitea/modules/context"
8
-	"code.gitea.io/git"
9 9
 )
10 10
 
11 11
 func SetEditorconfigIfExists(ctx *context.Context) {

+ 2 - 2
routers/repo/pull.go

@@ -10,14 +10,14 @@ import (
10 10
 	"path"
11 11
 	"strings"
12 12
 
13
-	"github.com/Unknwon/com"
13
+	"code.gitea.io/git"
14 14
 	"code.gitea.io/gitea/models"
15 15
 	"code.gitea.io/gitea/modules/auth"
16 16
 	"code.gitea.io/gitea/modules/base"
17 17
 	"code.gitea.io/gitea/modules/context"
18 18
 	"code.gitea.io/gitea/modules/log"
19 19
 	"code.gitea.io/gitea/modules/setting"
20
-	"code.gitea.io/git"
20
+	"github.com/Unknwon/com"
21 21
 )
22 22
 
23 23
 const (

+ 1 - 1
routers/repo/release.go

@@ -7,13 +7,13 @@ package repo
7 7
 import (
8 8
 	"fmt"
9 9
 
10
-	"github.com/Unknwon/paginater"
11 10
 	"code.gitea.io/gitea/models"
12 11
 	"code.gitea.io/gitea/modules/auth"
13 12
 	"code.gitea.io/gitea/modules/base"
14 13
 	"code.gitea.io/gitea/modules/context"
15 14
 	"code.gitea.io/gitea/modules/log"
16 15
 	"code.gitea.io/gitea/modules/markdown"
16
+	"github.com/Unknwon/paginater"
17 17
 )
18 18
 
19 19
 const (

+ 2 - 2
routers/repo/view.go

@@ -12,7 +12,7 @@ import (
12 12
 	"path"
13 13
 	"strings"
14 14
 
15
-	"github.com/Unknwon/paginater"
15
+	"code.gitea.io/git"
16 16
 	"code.gitea.io/gitea/models"
17 17
 	"code.gitea.io/gitea/modules/base"
18 18
 	"code.gitea.io/gitea/modules/context"
@@ -21,7 +21,7 @@ import (
21 21
 	"code.gitea.io/gitea/modules/setting"
22 22
 	"code.gitea.io/gitea/modules/template"
23 23
 	"code.gitea.io/gitea/modules/template/highlight"
24
-	"code.gitea.io/git"
24
+	"github.com/Unknwon/paginater"
25 25
 )
26 26
 
27 27
 const (

+ 2 - 2
routers/user/auth.go

@@ -130,8 +130,8 @@ func SignInPost(ctx *context.Context, form auth.SignInForm) {
130 130
 	// Register last login
131 131
 	u.SetLastLogin()
132 132
 	if err := models.UpdateUser(u); err != nil {
133
-	    ctx.Handle(500, "UpdateUser", err)
134
-	    return
133
+		ctx.Handle(500, "UpdateUser", err)
134
+		return
135 135
 	}
136 136
 
137 137
 	if redirectTo, _ := url.QueryUnescape(ctx.GetCookie("redirect_to")); len(redirectTo) > 0 {