From 69b490f358f016ba21fa3e01222364a2a70a7289 Mon Sep 17 00:00:00 2001 From: Onur Cinar Date: Mon, 23 Dec 2024 22:16:48 -0800 Subject: [PATCH] Mark the remove functions as test helper. functions. (#251) # Describe Request Mark the remove functions as test helper. functions. # Change Type Code maintenance. --- helper/remove.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helper/remove.go b/helper/remove.go index 6ef3d1e..b153d69 100644 --- a/helper/remove.go +++ b/helper/remove.go @@ -11,6 +11,8 @@ import ( // Remove removes the file with the given name. func Remove(t *testing.T, name string) { + t.Helper() + err := os.Remove(name) if err != nil { t.Errorf("Error removing file: %v", err) @@ -19,6 +21,8 @@ func Remove(t *testing.T, name string) { // RemoveAll removes the files with the given path. func RemoveAll(t *testing.T, path string) { + t.Helper() + err := os.RemoveAll(path) if err != nil { t.Errorf("Error removing files: %v", err)