From 8d535b0a0771ceb53a4163226b1d7d5f95052989 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 4 Oct 2025 03:45:49 -0500 Subject: start removing old table code --- config.common.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'config.common.go') diff --git a/config.common.go b/config.common.go index ff70e08..925b2de 100644 --- a/config.common.go +++ b/config.common.go @@ -22,19 +22,19 @@ import ( "go.wit.com/lib/protobuf/gitpb" ) -/* -func (all *ForgeConfigs) UpdateGoPath(name string, gopath string) bool { - oldr := all.DeleteByGoPath(name) - if oldr == nil { - // nothing to update - return false +// move away from IsReadOnly. Only use repo.Namespace +func (f *Forge) IsWritable(repo *gitpb.Repo) bool { + if f.Config.IsWritable(repo.Namespace) { + return true } - - // update gopath and append it back to the list - oldr.GoPath = gopath - return all.Append(oldr) + if f.Config.IsWritable(repo.FullPath) { + return true + } + if !f.Config.IsWritable(repo.GetGoPath()) { + return true + } + return false } -*/ // returns true if gopath is readonly() // will attempt to match IsWritable("foo") against anything ending in "foo" -- cgit v1.2.3