[x] I used gofmt for formatting the code before submitting the pull request.
Refining CreateTempDir() by appending a wildcard * at the end of the MkdirTemp() pattern argument. This ensures that a unique random string replaces the last *, preventing concurrent processes or goroutines from selecting the same directory. This approach is preferred over using only strconv.FormatInt(time.Now().Unix(), 10), which may not offer sufficient distinction between processes.
[x] I used gofmt for formatting the code before submitting the pull request.
Refining
CreateTempDir()
by appending a wildcard*
at the end of theMkdirTemp()
pattern argument. This ensures that a unique random string replaces the last*
, preventing concurrent processes or goroutines from selecting the same directory. This approach is preferred over using onlystrconv.FormatInt(time.Now().Unix(), 10)
, which may not offer sufficient distinction between processes.