No need to manually remove tmp directory created by t.TempDir()
The temporary directory created by t.TempDir() can be automatically removed by
the golang testing utilities. So no need to remove it manually.
FYI.
@@ -180,7 +180,6 @@ func TestDirPermission(t *testing.T) {
func TestRemoveMatchFile(t *testing.T) {
tmpdir := t.TempDir()
- defer os.RemoveAll(tmpdir)
f, err := os.CreateTemp(tmpdir, "tmp")
if err != nil {
t.Fatal(err)
