From fe98085712189edea536d9207b40f8b0daf826ef Mon Sep 17 00:00:00 2001 From: Jeff Carr <jcarr@wit.com> Date: Thu, 9 Jan 2025 15:56:03 -0600 Subject: [PATCH] locking seems to work in or out of the .proto file --- example/Makefile | 3 +-- sort.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/example/Makefile b/example/Makefile index 13c5919..a489ec4 100644 --- a/example/Makefile +++ b/example/Makefile @@ -8,11 +8,10 @@ vet: @GO111MODULE=off go vet build: - rm -f fruit.newsort.pb.go GO111MODULE=off go build auto: - ../autogenpb --proto fruit.proto --package main + ../autogenpb --proto fruit.proto --package main --mutex goimports: goimports -w *.go diff --git a/sort.go b/sort.go index 1bf34bb..eb2defa 100644 --- a/sort.go +++ b/sort.go @@ -191,7 +191,7 @@ func (pf *File) appendUnique(w io.Writer, blah *MsgName, names map[string]string var LOCK string = pf.Bases.Lockname if argv.Mutex { - LOCK = pf.Bases.Name + ".Lock" + LOCK = pf.Bases.Lockname } else { LOCK = "all.Lock" }