summaryrefslogtreecommitdiff
path: root/repoSettings.go
diff options
context:
space:
mode:
Diffstat (limited to 'repoSettings.go')
-rw-r--r--repoSettings.go15
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 {