Browse Source

Fix imports found by goimports.

Matthias Loibl 3 years ago
parent
commit
1f44b01e2a

+ 13 - 17
cmd/web.go

@@ -15,23 +15,6 @@ import (
15 15
 	"path"
16 16
 	"strings"
17 17
 
18
-	"github.com/go-macaron/binding"
19
-	"github.com/go-macaron/cache"
20
-	"github.com/go-macaron/captcha"
21
-	"github.com/go-macaron/csrf"
22
-	"github.com/go-macaron/gzip"
23
-	"github.com/go-macaron/i18n"
24
-	"github.com/go-macaron/session"
25
-	"github.com/go-macaron/toolbox"
26
-	"github.com/go-xorm/xorm"
27
-	"github.com/mcuadros/go-version"
28
-	"github.com/urfave/cli"
29
-	"gopkg.in/ini.v1"
30
-	"gopkg.in/macaron.v1"
31
-
32
-	"github.com/gogits/git-module"
33
-	"github.com/gogits/go-gogs-client"
34
-
35 18
 	"github.com/go-gitea/gitea/models"
36 19
 	"github.com/go-gitea/gitea/modules/auth"
37 20
 	"github.com/go-gitea/gitea/modules/bindata"
@@ -46,6 +29,19 @@ import (
46 29
 	"github.com/go-gitea/gitea/routers/org"
47 30
 	"github.com/go-gitea/gitea/routers/repo"
48 31
 	"github.com/go-gitea/gitea/routers/user"
32
+	"github.com/go-macaron/binding"
33
+	"github.com/go-macaron/cache"
34
+	"github.com/go-macaron/captcha"
35
+	"github.com/go-macaron/csrf"
36
+	"github.com/go-macaron/gzip"
37
+	"github.com/go-macaron/i18n"
38
+	"github.com/go-macaron/session"
39
+	"github.com/go-macaron/toolbox"
40
+	"github.com/go-xorm/xorm"
41
+	git "github.com/gogits/git-module"
42
+	"github.com/urfave/cli"
43
+	ini "gopkg.in/ini.v1"
44
+	macaron "gopkg.in/macaron.v1"
49 45
 )
50 46
 
51 47
 // CmdWeb represents the available web sub-command.

+ 4 - 6
models/git_diff.go

@@ -17,17 +17,15 @@ import (
17 17
 	"strings"
18 18
 
19 19
 	"github.com/Unknwon/com"
20
-	"github.com/sergi/go-diff/diffmatchpatch"
21
-	"golang.org/x/net/html/charset"
22
-	"golang.org/x/text/transform"
23
-
24
-	"github.com/gogits/git-module"
25
-
26 20
 	"github.com/go-gitea/gitea/modules/base"
27 21
 	"github.com/go-gitea/gitea/modules/log"
28 22
 	"github.com/go-gitea/gitea/modules/process"
29 23
 	"github.com/go-gitea/gitea/modules/setting"
30 24
 	"github.com/go-gitea/gitea/modules/template/highlight"
25
+	git "github.com/gogits/git-module"
26
+	"github.com/sergi/go-diff/diffmatchpatch"
27
+	"golang.org/x/net/html/charset"
28
+	"golang.org/x/text/transform"
31 29
 )
32 30
 
33 31
 type DiffLineType uint8

+ 3 - 5
models/pull.go

@@ -12,15 +12,13 @@ import (
12 12
 	"time"
13 13
 
14 14
 	"github.com/Unknwon/com"
15
-	"github.com/go-xorm/xorm"
16
-
17
-	"github.com/gogits/git-module"
18
-	api "github.com/gogits/go-gogs-client"
19
-
20 15
 	"github.com/go-gitea/gitea/modules/log"
21 16
 	"github.com/go-gitea/gitea/modules/process"
22 17
 	"github.com/go-gitea/gitea/modules/setting"
23 18
 	"github.com/go-gitea/gitea/modules/sync"
19
+	"github.com/go-xorm/xorm"
20
+	git "github.com/gogits/git-module"
21
+	api "github.com/gogits/go-gogs-client"
24 22
 )
25 23
 
26 24
 var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength)

+ 4 - 7
models/repo.go

@@ -21,19 +21,16 @@ import (
21 21
 
22 22
 	"github.com/Unknwon/cae/zip"
23 23
 	"github.com/Unknwon/com"
24
-	"github.com/go-xorm/xorm"
25
-	"github.com/mcuadros/go-version"
26
-	"gopkg.in/ini.v1"
27
-
28
-	git "github.com/gogits/git-module"
29
-	api "github.com/gogits/go-gogs-client"
30
-
31 24
 	"github.com/go-gitea/gitea/modules/bindata"
32 25
 	"github.com/go-gitea/gitea/modules/log"
33 26
 	"github.com/go-gitea/gitea/modules/markdown"
34 27
 	"github.com/go-gitea/gitea/modules/process"
35 28
 	"github.com/go-gitea/gitea/modules/setting"
36 29
 	"github.com/go-gitea/gitea/modules/sync"
30
+	"github.com/go-xorm/xorm"
31
+	git "github.com/gogits/git-module"
32
+	api "github.com/gogits/go-gogs-client"
33
+	ini "gopkg.in/ini.v1"
37 34
 )
38 35
 
39 36
 const (

+ 2 - 3
modules/auth/repo_form.go

@@ -9,10 +9,9 @@ import (
9 9
 	"strings"
10 10
 
11 11
 	"github.com/Unknwon/com"
12
-	"github.com/go-macaron/binding"
13
-	"gopkg.in/macaron.v1"
14
-
15 12
 	"github.com/go-gitea/gitea/models"
13
+	"github.com/go-macaron/binding"
14
+	macaron "gopkg.in/macaron.v1"
16 15
 )
17 16
 
18 17
 // _______________________________________    _________.______________________ _______________.___.

+ 1 - 2
modules/context/api.go

@@ -9,11 +9,10 @@ import (
9 9
 	"strings"
10 10
 
11 11
 	"github.com/Unknwon/paginater"
12
-	"gopkg.in/macaron.v1"
13
-
14 12
 	"github.com/go-gitea/gitea/modules/base"
15 13
 	"github.com/go-gitea/gitea/modules/log"
16 14
 	"github.com/go-gitea/gitea/modules/setting"
15
+	macaron "gopkg.in/macaron.v1"
17 16
 )
18 17
 
19 18
 type APIContext struct {

+ 2 - 3
modules/context/auth.go

@@ -7,11 +7,10 @@ package context
7 7
 import (
8 8
 	"net/url"
9 9
 
10
-	"github.com/go-macaron/csrf"
11
-	"gopkg.in/macaron.v1"
12
-
13 10
 	"github.com/go-gitea/gitea/modules/auth"
14 11
 	"github.com/go-gitea/gitea/modules/setting"
12
+	"github.com/go-macaron/csrf"
13
+	macaron "gopkg.in/macaron.v1"
15 14
 )
16 15
 
17 16
 type ToggleOptions struct {

+ 5 - 6
modules/context/context.go

@@ -12,17 +12,16 @@ import (
12 12
 	"strings"
13 13
 	"time"
14 14
 
15
-	"github.com/go-macaron/cache"
16
-	"github.com/go-macaron/csrf"
17
-	"github.com/go-macaron/i18n"
18
-	"github.com/go-macaron/session"
19
-	"gopkg.in/macaron.v1"
20
-
21 15
 	"github.com/go-gitea/gitea/models"
22 16
 	"github.com/go-gitea/gitea/modules/auth"
23 17
 	"github.com/go-gitea/gitea/modules/base"
24 18
 	"github.com/go-gitea/gitea/modules/log"
25 19
 	"github.com/go-gitea/gitea/modules/setting"
20
+	"github.com/go-macaron/cache"
21
+	"github.com/go-macaron/csrf"
22
+	"github.com/go-macaron/i18n"
23
+	"github.com/go-macaron/session"
24
+	macaron "gopkg.in/macaron.v1"
26 25
 )
27 26
 
28 27
 // Context represents context of a request.

+ 1 - 2
modules/context/org.go

@@ -7,10 +7,9 @@ package context
7 7
 import (
8 8
 	"strings"
9 9
 
10
-	"gopkg.in/macaron.v1"
11
-
12 10
 	"github.com/go-gitea/gitea/models"
13 11
 	"github.com/go-gitea/gitea/modules/setting"
12
+	macaron "gopkg.in/macaron.v1"
14 13
 )
15 14
 
16 15
 type Organization struct {

+ 3 - 5
modules/context/repo.go

@@ -11,14 +11,12 @@ import (
11 11
 	"strings"
12 12
 
13 13
 	"github.com/Unknwon/com"
14
-	"gopkg.in/editorconfig/editorconfig-core-go.v1"
15
-	"gopkg.in/macaron.v1"
16
-
17
-	"github.com/gogits/git-module"
18
-
19 14
 	"github.com/go-gitea/gitea/models"
20 15
 	"github.com/go-gitea/gitea/modules/log"
21 16
 	"github.com/go-gitea/gitea/modules/setting"
17
+	git "github.com/gogits/git-module"
18
+	editorconfig "gopkg.in/editorconfig/editorconfig-core-go.v1"
19
+	macaron "gopkg.in/macaron.v1"
22 20
 )
23 21
 
24 22
 type PullRequest struct {

+ 1 - 3
routers/repo/commit.go

@@ -9,13 +9,11 @@ import (
9 9
 	"path"
10 10
 
11 11
 	"github.com/Unknwon/paginater"
12
-
13
-	"github.com/gogits/git-module"
14
-
15 12
 	"github.com/go-gitea/gitea/models"
16 13
 	"github.com/go-gitea/gitea/modules/base"
17 14
 	"github.com/go-gitea/gitea/modules/context"
18 15
 	"github.com/go-gitea/gitea/modules/setting"
16
+	git "github.com/gogits/git-module"
19 17
 )
20 18
 
21 19
 const (

+ 1 - 1
routers/repo/editor.go

@@ -18,7 +18,7 @@ import (
18 18
 	"github.com/go-gitea/gitea/modules/log"
19 19
 	"github.com/go-gitea/gitea/modules/setting"
20 20
 	"github.com/go-gitea/gitea/modules/template"
21
-	"github.com/gogits/git-module"
21
+	git "github.com/gogits/git-module"
22 22
 )
23 23
 
24 24
 const (

+ 1 - 1
routers/repo/middlewares.go

@@ -5,7 +5,7 @@ import (
5 5
 
6 6
 	"github.com/go-gitea/gitea/models"
7 7
 	"github.com/go-gitea/gitea/modules/context"
8
-	"github.com/gogits/git-module"
8
+	git "github.com/gogits/git-module"
9 9
 )
10 10
 
11 11
 func setEditorconfigIfExists(ctx *context.Context) {

+ 1 - 3
routers/repo/pull.go

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

+ 1 - 3
routers/repo/view.go

@@ -13,9 +13,6 @@ import (
13 13
 	"strings"
14 14
 
15 15
 	"github.com/Unknwon/paginater"
16
-
17
-	"github.com/gogits/git-module"
18
-
19 16
 	"github.com/go-gitea/gitea/models"
20 17
 	"github.com/go-gitea/gitea/modules/base"
21 18
 	"github.com/go-gitea/gitea/modules/context"
@@ -24,6 +21,7 @@ import (
24 21
 	"github.com/go-gitea/gitea/modules/setting"
25 22
 	"github.com/go-gitea/gitea/modules/template"
26 23
 	"github.com/go-gitea/gitea/modules/template/highlight"
24
+	git "github.com/gogits/git-module"
27 25
 )
28 26
 
29 27
 const (