This pull request replaces os.MkdirTemp with t.TempDir. We can use the t.TempDir function from the testing package to create temporary directory. The directory created by t.TempDir is automatically removed when the test and all its subtests complete.
This pull request replaces
os.MkdirTemp
witht.TempDir
. We can use thet.TempDir
function from thetesting
package to create temporary directory. The directory created byt.TempDir
is automatically removed when the test and all its subtests complete.Reference: https://pkg.go.dev/testing#T.TempDir