diff options
| author | Jeff Carr <[email protected]> | 2025-01-12 08:28:23 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-12 08:28:23 -0600 |
| commit | 10f75f87a66a9329fd665bd85099fe94c7beae79 (patch) | |
| tree | 5746e3e18d3bdf3d8213798436ee93d0dd052772 /protoParse.go | |
| parent | 721bbd8f92d80286f12509fbbcff9f2f8e334093 (diff) | |
add nomutex support to disable it per message struct
Diffstat (limited to 'protoParse.go')
| -rw-r--r-- | protoParse.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/protoParse.go b/protoParse.go index 1e4cf79..8b6a313 100644 --- a/protoParse.go +++ b/protoParse.go @@ -265,6 +265,10 @@ func (pf *File) parseForMessage(line string) *MsgName { msg.DoMutex = true log.Info("Added Mutex=true:", msg.Name) } + if strings.Contains(line, "`autogenpb:nomutex`") { + msg.NoMutex = true + log.Info("Added Mutex=true:", msg.Name) + } if strings.Contains(line, "`autogenpb:marshal`") { msg.DoMarshal = true log.Info("Added Marshal=true:", msg.Name) |
