truncate on replace

This commit is contained in:
Aine 2023-04-06 23:43:12 +03:00
parent 7281464843
commit 07baec516f
No known key found for this signature in database
GPG Key ID: 34969C908CCA2804
1 changed files with 1 additions and 1 deletions

View File

@ -33,5 +33,5 @@ func getOutputSingle(output string) (*os.File, error) {
}
func getOutputMulti(output string) (*os.File, error) {
return os.OpenFile(output, os.O_WRONLY|os.O_CREATE, 0o644)
return os.OpenFile(output, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644)
}