gofix: don't rewrite O_APPEND opens

R=r, rog
CC=golang-dev
https://golang.org/cl/4364041
This commit is contained in:
Russ Cox 2011-04-05 11:12:02 -04:00
parent abbbdb168d
commit 32d22d1fb1

View File

@ -59,7 +59,7 @@ func main() {
certOut.Close()
log.Print("written cert.pem\n")
keyOut, err := os.OpenFile("key.pem", os.O_WRONLY|os.O_CREAT, 0600)
keyOut, err := os.OpenFile("key.pem", os.O_WRONLY|os.O_CREAT|os.O_TRUNC, 0600)
if err != nil {
log.Print("failed to open key.pem for writing:", err)
return