Skip to content

Commit b42e5c8

Browse files
committed
all: format sources with latest gofumpt
A new rule was introduced in gofumpt v0.9.0 to "clothe" naked returns. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1 parent 74393ea commit b42e5c8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/pwalk/pwalk_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func makeManyDirs(prefix string, levels, dirs, files int) (count uint32, err err
9797
var dir string
9898
dir, err = os.MkdirTemp(prefix, "d-")
9999
if err != nil {
100-
return
100+
return count, err
101101
}
102102
count++
103103
for f := 0; f < files; f++ {
@@ -114,12 +114,12 @@ func makeManyDirs(prefix string, levels, dirs, files int) (count uint32, err err
114114
}
115115
var c uint32
116116
if c, err = makeManyDirs(dir, levels-1, dirs, files); err != nil {
117-
return
117+
return count, err
118118
}
119119
count += c
120120
}
121121

122-
return
122+
return count, err
123123
}
124124

125125
// prepareTestSet() creates a directory tree of shallow files,

pkg/pwalkdir/pwalkdir_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func makeManyDirs(prefix string, levels, dirs, files int) (count uint32, err err
100100
var dir string
101101
dir, err = os.MkdirTemp(prefix, "d-")
102102
if err != nil {
103-
return
103+
return count, err
104104
}
105105
count++
106106
for f := 0; f < files; f++ {
@@ -117,12 +117,12 @@ func makeManyDirs(prefix string, levels, dirs, files int) (count uint32, err err
117117
}
118118
var c uint32
119119
if c, err = makeManyDirs(dir, levels-1, dirs, files); err != nil {
120-
return
120+
return count, err
121121
}
122122
count += c
123123
}
124124

125-
return
125+
return count, err
126126
}
127127

128128
// prepareTestSet() creates a directory tree of shallow files,

0 commit comments

Comments
 (0)