bsc icon indicating copy to clipboard operation
bsc copied to clipboard

refactor: use t.TempDir() instead of os.MkdirTemp

Open tgolang opened this issue 1 month ago • 0 comments

Description

TempDir() is a method introduced in Go 1.15 for testing.T. It automatically creates a temporary directory and cleans it up after the test is complete, eliminating the hassle of manually handling errors and cleanup. More detail about TempDir https://pkg.go.dev/testing#B.TempDir

The new pr for https://github.com/bnb-chain/bsc/pull/2942

Rationale

tell us why we need these changes...

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

tgolang avatar Dec 06 '25 12:12 tgolang