duh. TRUNC files
This commit is contained in:
parent
5846d5e4af
commit
96a063a15a
|
@ -22,7 +22,7 @@ func addMutex(names map[string]string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
w, _ := os.OpenFile(names["protobase"]+".pb.go", os.O_WRONLY|os.O_CREATE, 0600)
|
||||
w, _ := os.OpenFile(names["protobase"]+".pb.go", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
|
||||
|
||||
var found bool
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ func marshal(names map[string]string) {
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
w, _ := os.OpenFile(names["protobase"]+".marshal.pb.go", os.O_WRONLY|os.O_CREATE, 0600)
|
||||
w, _ := os.OpenFile(names["protobase"]+".marshal.pb.go", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
|
||||
|
||||
fmt.Fprintln(w, "package "+names["package"])
|
||||
headerComment(w)
|
||||
|
|
Loading…
Reference in New Issue