Skip to content

Commit

Permalink
Combined another if err statement
Browse files Browse the repository at this point in the history
  • Loading branch information
lflare committed Jan 9, 2022
1 parent 859f6bb commit c9a3ec8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ func Rewrite(path string, info os.FileInfo, err error) error {
buf[0], buf[1] = buf[1], buf[0]

// Write swapped bytes
err = writeSync(file, buf, i)
if err != nil {
if _, err := file.WriteAt(buf, i); err != nil {
return err
}

Expand Down

0 comments on commit c9a3ec8

Please sign in to comment.