overwrite output file, do not append to it
This commit is contained in:
parent
f7a2922d7d
commit
c90a3c0543
2
main.go
2
main.go
@ -64,7 +64,7 @@ func main() {
|
||||
return outRows[i].NumberQueries < outRows[j].NumberQueries
|
||||
})
|
||||
|
||||
f, err := os.OpenFile(*outFile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600)
|
||||
f, err := os.OpenFile(*outFile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to open output file '%s': %v", *outFile, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user