diff options
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 { |
