duh. TRUNC files

This commit is contained in:
Jeff Carr 2024-12-11 13:50:38 -06:00
parent 5846d5e4af
commit 96a063a15a
Notes: Jeff Carr 2024-12-14 15:44:54 -06:00
// `autogen:go.mod`

module go.wit.com/apps/autogenpb

go 1.20

require (
	github.com/alexflint/go-arg v1.5.1
	go.wit.com/lib/gui/shell v0.22.16
	go.wit.com/lib/protobuf/forgepb v0.0.29
	go.wit.com/log v0.22.9
	golang.org/x/text v0.21.0
)

require (
	github.com/alexflint/go-scalar v1.2.0 // indirect
	github.com/destel/rill v0.6.0 // indirect
	github.com/go-cmd/cmd v1.4.3 // indirect
	go.wit.com/lib/protobuf/gitpb v0.0.29 // indirect
	go.wit.com/lib/protobuf/zoopb v0.0.19 // indirect
	google.golang.org/protobuf v1.35.2 // indirect
)

// `autogen:go.sum`

github.com/alexflint/go-arg v1.5.1 h1:nBuWUCpuRy0snAG+uIJ6N0UvYxpxA0/ghA/AaHxlT8Y=
github.com/alexflint/go-arg v1.5.1/go.mod h1:A7vTJzvjoaSTypg4biM5uYNTkJ27SkNTArtYXnlqVO8=
github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+WQBRw=
github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/destel/rill v0.6.0 h1:8MQRzS6k0akKmwNZFahKIhG1dkBeNxMoWKSfOxkaJNw=
github.com/destel/rill v0.6.0/go.mod h1:srKuXzvGqINUEGYR5b/iwvW+L9/S35RxVHWGYbXNoO4=
github.com/go-cmd/cmd v1.4.3 h1:6y3G+3UqPerXvPcXvj+5QNPHT02BUw7p6PsqRxLNA7Y=
github.com/go-cmd/cmd v1.4.3/go.mod h1:u3hxg/ry+D5kwh8WvUkHLAMe2zQCaXd00t35WfQaOFk=
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
go.wit.com/lib/gui/shell v0.22.16 h1:MLCaJnxEjKWW275VeavKGvUo5G4AqkPOPG1mMt2SJps=
go.wit.com/lib/gui/shell v0.22.16/go.mod h1:nypmR50Bov++Ajjf2aC/RJ+4DWh2Xtm2ciaRm7pGY54=
go.wit.com/lib/protobuf/forgepb v0.0.29 h1:7rg5IuZD3AZsLfa5F3WTGMApmkmQ8oyT5lnD6S8j2tE=
go.wit.com/lib/protobuf/forgepb v0.0.29/go.mod h1:QOogmjSikF71VU1Dks+cj4K9O2J/8HsaD1HQRJbiyTE=
go.wit.com/lib/protobuf/gitpb v0.0.29 h1:OsaOrWHHAgH6YslT/tevy0tbXDi+JCBZr7bimk59azc=
go.wit.com/lib/protobuf/gitpb v0.0.29/go.mod h1:pBy6eSP/Q3eizNeYlKxxetowWPqOEKx+adTqkFWYS3U=
go.wit.com/lib/protobuf/zoopb v0.0.19 h1:sC5l0gs20adoV/zws7VEYlPhmgB77TvyzSK2XY2r5NI=
go.wit.com/lib/protobuf/zoopb v0.0.19/go.mod h1:bdeHyuJI//suaWh97S0G2dBK46+e0gQk0u9nL3yfAcI=
go.wit.com/log v0.22.9 h1:aBM6SI2kxlJcBfS/osFTomJqNhO0hfEo1gk+LCqLk7Y=
go.wit.com/log v0.22.9/go.mod h1:4uNPFBqhsAh8zNF+zxVEmC3c/9AZ8JeTfUUvRpddvLQ=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io=
google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

// `autogen:`
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)