restored original create file instead of append

This commit is contained in:
Senad Uka
2013-11-05 15:37:49 +00:00
parent ef70acad23
commit 441a898718
2 changed files with 3 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ func file(filename string, create bool) (*os.File, error) {
var file *os.File
var err error
if create {
file, err = os.OpenFile(filename, os.O_RDWR|os.O_APPEND, 0660)
file, err = os.Create(filename)
} else {
file, err = os.Open(filename)
}

View File

@@ -45,6 +45,8 @@ func report(reporter, input, output string) error {
results := vegeta.Results{}
if err := results.Decode(in); err != nil {
return err
} else {
log.Printf("Number of results: %d", len(results))
}
all = append(all, results...)
}