diff options
| author | Jeff Carr <[email protected]> | 2024-12-03 13:24:41 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-03 13:24:41 -0600 |
| commit | 3600dbed8ceca3253afcd6b6ce1ee3f941aef30d (patch) | |
| tree | 9eda700b2d8efce5bba61558af33b15b919df844 /repoSettings.go | |
| parent | dfae92e3c35e445e5a8098c720cac9b8d3f969c8 (diff) | |
unbelievable. rill is great.
Diffstat (limited to 'repoSettings.go')
| -rw-r--r-- | repoSettings.go | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/repoSettings.go b/repoSettings.go index 66677f8..128d1a1 100644 --- a/repoSettings.go +++ b/repoSettings.go @@ -12,6 +12,8 @@ package forgepb import ( "path/filepath" "strings" + + "go.wit.com/lib/protobuf/gitpb" ) /* @@ -36,10 +38,19 @@ func (all *ForgeConfigs) UpdateGoPath(name string, gopath string) bool { // returns true if gopath is readonly() // will attempt to match IsWritable("foo") against anything ending in "foo" -func (f *Forge) IsReadOnly(gopath string) bool { +func (f *Forge) IsReadOnly(repo *gitpb.Repo) bool { + // var match *ForgeConfig + + return f.Config.IsReadOnly(repo.GoPath) +} + +// returns true if gopath is readonly() +// will attempt to match IsWritable("foo") against anything ending in "foo" +func (f *ForgeConfigs) IsReadOnly(gopath string) bool { var match *ForgeConfig - loop := f.Config.SortByGoPath() // get the list of repos + + loop := f.SortByGoPath() // get the list of repos for loop.Scan() { r := loop.Next() if r.GoPath == gopath { |
