locking seems to work in or out of the .proto file
This commit is contained in:
parent
65aa8e85b1
commit
fe98085712
|
@ -8,11 +8,10 @@ vet:
|
||||||
@GO111MODULE=off go vet
|
@GO111MODULE=off go vet
|
||||||
|
|
||||||
build:
|
build:
|
||||||
rm -f fruit.newsort.pb.go
|
|
||||||
GO111MODULE=off go build
|
GO111MODULE=off go build
|
||||||
|
|
||||||
auto:
|
auto:
|
||||||
../autogenpb --proto fruit.proto --package main
|
../autogenpb --proto fruit.proto --package main --mutex
|
||||||
|
|
||||||
goimports:
|
goimports:
|
||||||
goimports -w *.go
|
goimports -w *.go
|
||||||
|
|
2
sort.go
2
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
|
var LOCK string = pf.Bases.Lockname
|
||||||
|
|
||||||
if argv.Mutex {
|
if argv.Mutex {
|
||||||
LOCK = pf.Bases.Name + ".Lock"
|
LOCK = pf.Bases.Lockname
|
||||||
} else {
|
} else {
|
||||||
LOCK = "all.Lock"
|
LOCK = "all.Lock"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue