use the fhelp package

This commit is contained in:
Jeff Carr 2025-01-14 12:49:22 -06:00
parent 81d6cd6b74
commit 97c65be0a0
2 changed files with 5 additions and 3 deletions

View File

@ -66,9 +66,10 @@ func (pb *Files) hasPluralMessage(f *File) error {
func (pb *Files) protoParse(pf *File) error { func (pb *Files) protoParse(pf *File) error {
// does the file conform to the standard? (also reads in UUID & Version) // does the file conform to the standard? (also reads in UUID & Version)
if err := pb.hasPluralMessage(pf); err != nil { // if err := pb.hasPluralMessage(pf); err != nil {
return err // return err
} // }
// os.Exit(0)
uuid, version, err := fhelp.ValidProtobuf(pf.Filename) uuid, version, err := fhelp.ValidProtobuf(pf.Filename)
if err != nil { if err != nil {

View File

@ -63,6 +63,7 @@ func (pb *Files) protocBuild(f *File) error {
cmd := []string{"protoc", "--go_out=."} cmd := []string{"protoc", "--go_out=."}
cmd = append(cmd, "--proto_path="+gopath) cmd = append(cmd, "--proto_path="+gopath)
cmd = append(cmd, "--go_opt=M"+f.Filename+"="+gopath) cmd = append(cmd, "--go_opt=M"+f.Filename+"="+gopath)
// cmd = append(cmd, "--print_free_field_numbers")
// look for included proto files // look for included proto files
lines := strings.Split(string(data), "\n") lines := strings.Split(string(data), "\n")