1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-19 16:58:37 +00:00

A better go code formatter, and now make fmt can run in Windows (#17684)

* go build / format tools
* re-format imports
This commit is contained in:
wxiaoguang
2021-11-17 20:34:35 +08:00
committed by GitHub
parent 29cc169d20
commit 750a8465f5
106 changed files with 731 additions and 42 deletions

View File

@@ -7,8 +7,9 @@ package convert
import (
"testing"
_ "github.com/mattn/go-sqlite3"
"github.com/stretchr/testify/assert"
_ "github.com/mattn/go-sqlite3"
)
func TestToCorrectPageSize(t *testing.T) {

View File

@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/timeutil"
"xorm.io/builder"
)

View File

@@ -8,6 +8,7 @@ import (
"testing"
"code.gitea.io/gitea/models"
"github.com/stretchr/testify/assert"
)

View File

@@ -12,6 +12,7 @@ import (
"time"
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)

View File

@@ -17,6 +17,7 @@ import (
"time"
"code.gitea.io/gitea/modules/git"
gogit "github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/object"
)

View File

@@ -11,6 +11,7 @@ import (
"testing"
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)

View File

@@ -9,6 +9,7 @@ import (
"testing"
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)

View File

@@ -17,6 +17,7 @@ import (
"code.gitea.io/gitea/modules/analyze"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"github.com/alecthomas/chroma"
"github.com/alecthomas/chroma/formatters/html"
"github.com/alecthomas/chroma/lexers"

View File

@@ -9,6 +9,7 @@ import (
"testing"
"code.gitea.io/gitea/modules/setting"
"gopkg.in/ini.v1"
)

View File

@@ -9,6 +9,7 @@ import (
"testing"
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)

View File

@@ -15,9 +15,8 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
"gopkg.in/ini.v1"
"github.com/stretchr/testify/assert"
"gopkg.in/ini.v1"
)
func TestMain(m *testing.M) {

View File

@@ -13,9 +13,8 @@ import (
"code.gitea.io/gitea/models/unittest"
"code.gitea.io/gitea/modules/setting"
"gopkg.in/ini.v1"
"github.com/stretchr/testify/assert"
"gopkg.in/ini.v1"
)
func TestMain(m *testing.M) {

View File

@@ -15,6 +15,7 @@ import (
"time"
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)

View File

@@ -6,12 +6,11 @@ package mdstripper
import (
"bytes"
"io"
"net/url"
"strings"
"sync"
"io"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markup/common"
"code.gitea.io/gitea/modules/setting"

View File

@@ -8,6 +8,7 @@ import (
"testing"
. "code.gitea.io/gitea/modules/markup"
_ "code.gitea.io/gitea/modules/markup/markdown"
"github.com/stretchr/testify/assert"

View File

@@ -11,6 +11,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
)

View File

@@ -10,6 +10,7 @@ import (
"testing"
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)

View File

@@ -11,6 +11,7 @@ import (
"time"
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)

View File

@@ -8,7 +8,6 @@ import (
"testing"
"code.gitea.io/gitea/models/unittest"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/test"

View File

@@ -9,7 +9,6 @@ import (
"testing"
"code.gitea.io/gitea/models/unittest"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/test"

View File

@@ -8,7 +8,6 @@ import (
"testing"
"code.gitea.io/gitea/models/unittest"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/test"

View File

@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/unittest"
"code.gitea.io/gitea/modules/git"
"github.com/stretchr/testify/assert"
)

View File

@@ -10,6 +10,7 @@ import (
"time"
"code.gitea.io/gitea/modules/log"
ini "gopkg.in/ini.v1"
)