diff options
| author | Jeff Carr <[email protected]> | 2024-11-30 23:20:10 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-30 23:20:10 -0600 |
| commit | 9a34961d3de3df092ab05d91150486166fe9a70a (patch) | |
| tree | 48836c34811e9813070d46b7ca5bd40d3827945c /main.go | |
| parent | 3a4e0c1046276235488326bb4e032c801280fc15 (diff) | |
only do mutex after proto
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -106,6 +106,18 @@ func main() { log.Info("protoc build error:", err) os.Exit(-1) } + + // experiment to add a mutex to the structs. + // this might fix my other not so great lock implementation on sort (?) + // not sure though because I haven't tried it. leave it here until + // I can test it + if err := addMutex(sortmap); err == nil { + log.Info("adding mutex to existing protoc-gen-go file worked") + sortmap["mutex"] = "true" + } else { + log.Info("adding mutex to existing protoc-gen-go file did not work") + sortmap["mutex"] = "false" + } } // if foo.pb.go still doesn't exist, protoc failed @@ -115,15 +127,6 @@ func main() { badExit(errors.New("failed to be created with protoc and proto-gen-go")) } - // add mutex - if err := addMutex(sortmap); err == nil { - log.Info("adding mutex to existing protoc-gen-go file worked") - sortmap["mutex"] = "true" - } else { - log.Info("adding mutex to existing protoc-gen-go file did not work") - sortmap["mutex"] = "false" - } - if argv.NoSort { log.Info("not making sort.pb.go file (--no-sort == true)") } else { |
