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

Unified Diff: src/pkg/testing/testing.go

Issue 4357052: code review 4357052: os: New Open API. (Closed)
Patch Set: diff -r dc1d5042801a https://go.googlecode.com/hg/ Created 12 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/pkg/os/inotify/inotify_linux_test.go ('K') | « src/pkg/strconv/fp_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/testing/testing.go
===================================================================
--- a/src/pkg/testing/testing.go
+++ b/src/pkg/testing/testing.go
@@ -212,7 +212,7 @@
runtime.MemProfileRate = *memProfileRate
}
if *cpuProfile != "" {
- f, err := os.Open(*cpuProfile, os.O_WRONLY|os.O_CREAT|os.O_TRUNC, 0666)
+ f, err := os.Create(*cpuProfile)
if err != nil {
fmt.Fprintf(os.Stderr, "testing: %s", err)
return
@@ -233,7 +233,7 @@
pprof.StopCPUProfile() // flushes profile to disk
}
if *memProfile != "" {
- f, err := os.Open(*memProfile, os.O_WRONLY|os.O_CREAT|os.O_TRUNC, 0666)
+ f, err := os.Create(*memProfile)
if err != nil {
fmt.Fprintf(os.Stderr, "testing: %s", err)
return
« src/pkg/os/inotify/inotify_linux_test.go ('K') | « src/pkg/strconv/fp_test.go ('k') | no next file » | no next file with comments »

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