create file if it doesn't exist

This commit is contained in:
Christian Schwarz 2017-05-12 20:15:27 +02:00
parent dd6dd60e98
commit 6524cfce0c

View File

@ -58,7 +58,7 @@ func main() {
panic(err)
}
f, err := os.OpenFile(*outgoingFile, os.O_WRONLY, 0600)
f, err := os.OpenFile(*outgoingFile, os.O_CREATE|os.O_WRONLY, 0600)
if err != nil {
panic(err)
}