Skip to content

Commit

Permalink
Zeros function improved (do we need this?)
Browse files Browse the repository at this point in the history
  • Loading branch information
acidvegas committed Dec 27, 2023
1 parent 2f20909 commit bd9f682
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,8 @@ func Zeros(path string, size int64) error {
}
defer file.Close()

offset, err := file.Seek(0, 0)
if err != nil {
return err
}
buff := make([]byte, size)
file.WriteAt(buff, offset)
file.WriteAt(buff, 0)
return nil
}

Expand Down

0 comments on commit bd9f682

Please sign in to comment.