You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The originally proposed name for testing.T.TempDir was Mkdir. The name was changed during the proposal process. There has been some confusion about the intended semantics: is it more like ioutil.TempDir or os.TempDir ?
To avoid the confusion, I suggest that we use the originally proposed name, Mkdir. It's then very clear that the method is creating a new directory. The fact that the method has no arguments is a clear indication that the directory name is chosen by the method itself rather than by the caller.
The text was updated successfully, but these errors were encountered:
I was initially against this name, because I thought testing.T.Mkdir could be confused for os.Mkdir. But Roger correctly pointed out that's very unlikely, since testing.T.Mkdir does not take any arguments.
Mkdir does not convey "this is temporary". (It's not ioutil.Mkdir.) Let's leave it as TempDir. I understand the conflict with os.TempDir, but more people know about ioutil.TempDir anyway. Thanks.
The originally proposed name for
testing.T.TempDir
wasMkdir
. The name was changed during the proposal process. There has been some confusion about the intended semantics: is it more likeioutil.TempDir
oros.TempDir
?To avoid the confusion, I suggest that we use the originally proposed name,
Mkdir
. It's then very clear that the method is creating a new directory. The fact that the method has no arguments is a clear indication that the directory name is chosen by the method itself rather than by the caller.The text was updated successfully, but these errors were encountered: