few comment nits. thanks again. http://codereview.appspot.com/1686047/diff/7001/8001 File src/pkg/io/ioutil/tempfile.go (right): http://codereview.appspot.com/1686047/diff/7001/8001#newcode37 src/pkg/io/ioutil/tempfile.go:37: // for temporary files. ...
13 years, 10 months ago
(2010-06-30 19:37:19 UTC)
#5
few comment nits. thanks again.
http://codereview.appspot.com/1686047/diff/7001/8001
File src/pkg/io/ioutil/tempfile.go (right):
http://codereview.appspot.com/1686047/diff/7001/8001#newcode37
src/pkg/io/ioutil/tempfile.go:37: // for temporary files. Multiple programs
calling TempFile
sorry, one more nit.
// If dir is the empty string, TempFile uses the default directory
// for temporary files (see os.TempDir).
then please put the rest of the comment back as it was
(no need to reflow, and better to start new sentences
on new lines for fast scanning of text output anyway).
http://codereview.appspot.com/1686047/diff/7001/8004
File src/pkg/os/env_unix.go (right):
http://codereview.appspot.com/1686047/diff/7001/8004#newcode9
src/pkg/os/env_unix.go:9: // TempDir retrieves the path of the default directory
for temporary
godoc doesn't know which comment to use in general.
for now, let's merge the comments into one.
// TempDir returns the default directory to use for temporary files.
// On Unix-like systems, it uses the environment variable $TMPDIR
// or, if that is empty, /tmp.
// On Windows systems, it uses the Windows GetTempPath API.
http://codereview.appspot.com/1686047/diff/7001/8005
File src/pkg/os/env_windows.go (right):
http://codereview.appspot.com/1686047/diff/7001/8005#newcode14
src/pkg/os/env_windows.go:14: // TempDir retrieves the path of the default
directory for temporary
delete doc comment (see other file)
I changed the line in tempfile_test.go to say re := testing.MustCompile("^" + regexp.QuoteMeta(dir) + "/ioutil_test[0-9]+$") ...
13 years, 10 months ago
(2010-06-30 20:37:11 UTC)
#8
I changed the line in tempfile_test.go to say
re := testing.MustCompile("^" + regexp.QuoteMeta(dir) + "/ioutil_test[0-9]+$")
(added QuoteMeta) so that if $TMPDIR has a + in it,
the regexp doesn't fail. You may want to just revert
that file (hg revert) before running hg sync. Otherwise
you'll have a merge conflict.
Sorry for the trouble; I have no idea why my $TMPDIR
is so weird.
Russ
Issue 1686047: code review 1686047: io/ioutil.TempFile for Windows
Created 13 years, 10 months ago by peterGo
Modified 13 years, 10 months ago
Reviewers:
Base URL:
Comments: 3