using mutex lock from protobuf

This commit is contained in:
Jeff Carr 2024-12-01 00:48:51 -06:00
parent 0b5687f766
commit 4e47dea41e
3 changed files with 10 additions and 9 deletions

View File

@ -5,15 +5,11 @@
# go install # go install
all: forgeConfig.pb.go all: forgeConfig.pb.go vet
reset
make -C forgeConfig
vet: lint vet:
GO111MODULE=off go vet @GO111MODULE=off go vet
@echo this go library package builds okay
lint:
-buf lint repo.proto
# autofixes your import headers in your golang files # autofixes your import headers in your golang files
goimports: goimports:
@ -31,6 +27,9 @@ clean:
-rm -f go.* -rm -f go.*
make -C forgeConfig clean make -C forgeConfig clean
build:
make -C forgeConfig
install: install:
make -C forgeConfig install make -C forgeConfig install

View File

@ -25,7 +25,7 @@ func main() {
// try to delete, then save config and exit // try to delete, then save config and exit
if argv.Delete { if argv.Delete {
if oldr := f.Config.DeleteByGoPath(argv.GoPath); oldr == nil { if f.Config.DeleteByGoPath(argv.GoPath) {
log.Info("deleted", argv.GoPath, "did not exist. did nothing") log.Info("deleted", argv.GoPath, "did not exist. did nothing")
os.Exit(0) os.Exit(0)
} }

View File

@ -20,6 +20,7 @@ func (f *Forge) SortByGoPath() *ForgeConfigIterator {
} }
*/ */
/*
func (all *ForgeConfigs) UpdateGoPath(name string, gopath string) bool { func (all *ForgeConfigs) UpdateGoPath(name string, gopath string) bool {
oldr := all.DeleteByGoPath(name) oldr := all.DeleteByGoPath(name)
if oldr == nil { if oldr == nil {
@ -31,6 +32,7 @@ func (all *ForgeConfigs) UpdateGoPath(name string, gopath string) bool {
oldr.GoPath = gopath oldr.GoPath = gopath
return all.Append(oldr) return all.Append(oldr)
} }
*/
// returns true if gopath is readonly() // returns true if gopath is readonly()
// will attempt to match IsWritable("foo") against anything ending in "foo" // will attempt to match IsWritable("foo") against anything ending in "foo"