From bd9f68282c91fa7396a3ab666b48324bb18a9c07 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Wed, 27 Dec 2023 15:21:33 -0500 Subject: [PATCH] Zeros function improved (do we need this?) --- main.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/main.go b/main.go index e7d9cb8..373e34e 100644 --- a/main.go +++ b/main.go @@ -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 }