diff options
| author | Jeff Carr <[email protected]> | 2025-10-04 03:45:49 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-04 03:45:49 -0500 |
| commit | 8d535b0a0771ceb53a4163226b1d7d5f95052989 (patch) | |
| tree | fdbef32a60674ea185024c8aba37fac836cce528 /config.common.go | |
| parent | 5ee8c4f295205e7bfd316b43a503f1ec281a1b03 (diff) | |
start removing old table codev0.0.163
Diffstat (limited to 'config.common.go')
| -rw-r--r-- | config.common.go | 22 |
1 files changed, 11 insertions, 11 deletions
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" |
