diff options
| author | Jeff Carr <[email protected]> | 2025-01-09 06:47:35 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-09 06:47:35 -0600 |
| commit | c99d8763e6c85513c700d58cd1e2163c31d2187d (patch) | |
| tree | aa5f7b85c19273e9d871abf829e70f45d64911f4 /newsort.go | |
| parent | b0ceb9e1b4c51fbe0b51b061dadd34bce793efc3 (diff) | |
iterator top done?
Diffstat (limited to 'newsort.go')
| -rw-r--r-- | newsort.go | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -3,6 +3,8 @@ package main import ( "os" "strings" + + "go.wit.com/log" ) func (pb *Files) makeNewSortfile(pf *File) { @@ -10,12 +12,15 @@ func (pb *Files) makeNewSortfile(pf *File) { header(f, pf) - if sortmap["lock"] == "all" { - // if the lock is set to 'all' this means the mutex was put in the protoc-gen-go struct - } else { - syncLock(f, sortmap) + for _, msg := range pf.MsgNames { + if msg.DoMutex { + pf.syncLock(f, msg.Lockname) + pf.iterTop(f, msg.Name) + } else { + log.Info("Skipping syncLock() for", msg.Name, "DoMutex = false") + } } - iterTop(f, sortmap) + iterNext(f, sortmap) iterAppend(f, sortmap) // Append() enforce no unique keys iterSortAll(f, sortmap) |
