summaryrefslogtreecommitdiff
path: root/protoParse.go
diff options
context:
space:
mode:
Diffstat (limited to 'protoParse.go')
-rw-r--r--protoParse.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/protoParse.go b/protoParse.go
index e09bbc3..6ecaa9d 100644
--- a/protoParse.go
+++ b/protoParse.go
@@ -191,12 +191,15 @@ func (pf *File) parseForMessage(line string) *MsgName {
msg.Lockname = pf.Filebase + "Mu" // this should be lowercase. do not export the Mutex
msg.NeedIter = true
+ // making this the default. it's confirmed pb.Marshal() panics with the existance of a sync var
+ msg.NoMutex = true
if strings.Contains(line, "`autogenpb:mutex`") {
msg.DoMutex = true
+ msg.NoMutex = false
// log.Info("Added Mutex=true:", msg.Name)
}
if strings.Contains(line, "`autogenpb:nomutex`") {
- msg.NoMutex = true
+ // msg.NoMutex = true
// log.Info("Added Mutex=true:", msg.Name)
}
if strings.Contains(line, "`autogenpb:marshal`") {