duh. TRUNC files

This commit is contained in:
Jeff Carr 2024-12-11 13:50:38 -06:00
parent 5846d5e4af
commit 96a063a15a
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -8,7 +8,7 @@ import (
)
func makeSortfile() {
f, _ := os.OpenFile(sortmap["protobase"]+".sort.pb.go", os.O_WRONLY|os.O_CREATE, 0600)
f, _ := os.OpenFile(sortmap["protobase"]+".sort.pb.go", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
header(f, sortmap)