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.