Skip to content

Commit 2ebf677

Browse files
committed
chore: fix lint
1 parent 1354e30 commit 2ebf677

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cmd/gowraperr/main.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func isGoFile(f os.FileInfo) bool {
3535
return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go")
3636
}
3737

38-
func process(src []byte) ([]byte, error) {
38+
func process(src []byte) []byte {
3939
result := new(bytes.Buffer)
4040
s := bufio.NewScanner(bytes.NewReader(src))
4141
var inImports bool
@@ -72,18 +72,15 @@ func process(src []byte) ([]byte, error) {
7272
inImports = false
7373
}
7474
}
75-
return result.Bytes(), nil
75+
return result.Bytes()
7676
}
7777

7878
func processFile(filename string) error {
7979
src, err := os.ReadFile(filename)
8080
if err != nil {
8181
return err
8282
}
83-
res, err := process(src)
84-
if err != nil {
85-
return err
86-
}
83+
res := process(src)
8784
if bytes.Equal(src, res) {
8885
return nil
8986
}

0 commit comments

Comments
 (0)