util: Generalize the file mode of 0666 with util.FileMode

This commit is contained in:
Jöran Karl
2024-05-30 21:14:04 +02:00
parent 69064cf808
commit 18a81f043c
6 changed files with 12 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ func overwriteFile(name string, enc encoding.Encoding, fn func(io.Writer) error,
return
}
} else if writeCloser, err = os.OpenFile(name, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666); err != nil {
} else if writeCloser, err = os.OpenFile(name, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, util.FileMode); err != nil {
return
}