Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Nov 3, 2021
1 parent 1354e30 commit 2ebf677
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmd/gowraperr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func isGoFile(f os.FileInfo) bool {
return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go")
}

func process(src []byte) ([]byte, error) {
func process(src []byte) []byte {
result := new(bytes.Buffer)
s := bufio.NewScanner(bytes.NewReader(src))
var inImports bool
Expand Down Expand Up @@ -72,18 +72,15 @@ func process(src []byte) ([]byte, error) {
inImports = false
}
}
return result.Bytes(), nil
return result.Bytes()
}

func processFile(filename string) error {
src, err := os.ReadFile(filename)
if err != nil {
return err
}
res, err := process(src)
if err != nil {
return err
}
res := process(src)
if bytes.Equal(src, res) {
return nil
}
Expand Down

0 comments on commit 2ebf677

Please sign in to comment.