Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(365)

Issue 3108042: The io/ioutil package has a function for creating tempo...

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 6 months ago by al-maisan
Modified:
2 years, 7 months ago
Reviewers:
golang-dev
Visibility:
Public.

Description

The io/ioutil package has a function for creating temporary files (http://golang.org/pkg/io/ioutil/#TempFile) but no equivalent for directories. I was thinking of adding a MkTempDir() function to io/ioutil and renaming ioutil.TempFile to ioutil.MkTempFile for consistency. Naming the new ioutil function "MkTempDir" as opposed to "TempDir" is more expressive IMHO and avoids confusion with os.TempDir (http://golang.org/pkg/os/#TempDir).

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -13 lines) Patch
M src/cmd/godoc/utils.go View 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/io/ioutil/tempfile.go View 3 chunks +33 lines, -5 lines 0 comments Download
M src/pkg/io/ioutil/tempfile_test.go View 1 chunk +24 lines, -6 lines 0 comments Download
M src/pkg/os/os_test.go View 1 chunk +1 line, -1 line 0 comments Download

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b