Skip to content

Commit

Permalink
Mark the remove functions as test helper. functions. (#251)
Browse files Browse the repository at this point in the history
# Describe Request

Mark the remove functions as test helper. functions.

# Change Type

Code maintenance.
  • Loading branch information
cinar authored Dec 24, 2024
1 parent 660406d commit 69b490f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helper/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 69b490f

Please sign in to comment.