diff options
Diffstat (limited to 'settings.go')
| -rw-r--r-- | settings.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/settings.go b/settings.go index 61f0d98..c024d81 100644 --- a/settings.go +++ b/settings.go @@ -28,10 +28,10 @@ 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 (all *ForgeConfigs) IsReadOnly(gopath string) bool { +func (f *Forge) IsReadOnly(gopath string) bool { var match *ForgeConfig - loop := all.SortByPath() // get the list of repos + loop := f.Config.SortByPath() // get the list of repos for loop.Scan() { r := loop.Next() if r.GoPath == gopath { @@ -88,11 +88,11 @@ func (all *ForgeConfigs) IsReadOnly(gopath string) bool { // this let's you check a git tag version against a package .deb version // allows gopath's to not need to match the .deb name // this is important in lots of cases! It is normal and happens often enough. -func (all *ForgeConfigs) DebName(gopath string) string { +func (f *Forge) DebName(gopath string) string { // get "zookeeper" from "go.wit.com/apps/zookeeper" normalBase := filepath.Base(gopath) - loop := all.SortByPath() + loop := f.Config.SortByPath() for loop.Scan() { r := loop.Next() if r.GoPath == gopath { @@ -115,13 +115,13 @@ func (all *ForgeConfigs) DebName(gopath string) string { // // IsPrivate("go.foo.com/jcarr/foo") returns true if private // IsPrivate("foo") also returns true if "go.bar.com/jcarr/foo" is private -func (all *ForgeConfigs) IsPrivate(thing string) bool { +func (f *Forge) IsPrivate(thing string) bool { var match *ForgeConfig // sort by path means the simple 'match' logic // here works in the sense the last directory match // is the one that is used - loop := all.SortByPath() // get the list of repos + loop := f.Config.SortByPath() // get the list of repos for loop.Scan() { r := loop.Next() if r.GoPath == thing { @@ -159,10 +159,10 @@ func (all *ForgeConfigs) IsPrivate(thing string) bool { // file that lets you set things as favorites // so you can just go-clone a bunch of common things // on a new box or after you reset/delete your ~/go/src dir -func (all *ForgeConfigs) IsFavorite(thing string) bool { +func (f *Forge) IsFavorite(thing string) bool { var match *ForgeConfig - loop := all.SortByPath() // get the list of repos + loop := f.Config.SortByPath() // get the list of repos for loop.Scan() { r := loop.Next() if r.GoPath == thing { |
