all: Format code with gofumpt

See https://github.com/mvdan/gofumpt
This commit is contained in:
Bjørn Erik Pedersen
2020-12-02 13:23:25 +01:00
parent 32471b57bd
commit d90e37e0c6
442 changed files with 1426 additions and 2254 deletions

View File

@@ -56,16 +56,16 @@ func TestWalkRootMappingFs(t *testing.T) {
c.Assert(afero.WriteFile(fs, filepath.Join("e/f", testfile), []byte("some content"), 0755), qt.IsNil)
rm := []RootMapping{
RootMapping{
{
From: "static/b",
To: "e/f",
},
RootMapping{
{
From: "static/a",
To: "c/d",
},
RootMapping{
{
From: "static/c",
To: "a/b",
},
@@ -79,7 +79,6 @@ func TestWalkRootMappingFs(t *testing.T) {
c.Assert(err, qt.IsNil)
c.Assert(names, qt.DeepEquals, []string{"a/test.txt", "b/test.txt", "c/test.txt"})
}
func skipSymlink() bool {
@@ -137,7 +136,6 @@ func TestWalkSymbolicLink(t *testing.T) {
// Note: the docsreal folder is considered cyclic when walking from the root, but this works.
c.Assert(names, qt.DeepEquals, []string{"b.txt", "docsreal/sub/a.txt"})
})
}
func collectFilenames(fs afero.Fs, base, root string) ([]string, error) {
@@ -165,7 +163,6 @@ func collectFilenames(fs afero.Fs, base, root string) ([]string, error) {
err := w.Walk()
return names, err
}
func collectFileinfos(fs afero.Fs, base, root string) ([]FileMetaInfo, error) {
@@ -186,7 +183,6 @@ func collectFileinfos(fs afero.Fs, base, root string) ([]FileMetaInfo, error) {
err := w.Walk()
return fis, err
}
func BenchmarkWalk(b *testing.B) {
@@ -234,5 +230,4 @@ func BenchmarkWalk(b *testing.B) {
b.Fatal(err)
}
}
}