summaryrefslogtreecommitdiff
path: root/configLookup.go
diff options
context:
space:
mode:
Diffstat (limited to 'configLookup.go')
-rw-r--r--configLookup.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/configLookup.go b/configLookup.go
index cda036e..9a61c2e 100644
--- a/configLookup.go
+++ b/configLookup.go
@@ -37,9 +37,9 @@ func (all *ForgeConfigs) UpdateGoPath(name string, gopath string) bool {
func (fc *ForgeConfigs) IsReadOnly(gopath string) bool {
var match *ForgeConfig
- loop := fc.SortByGoPath() // get the list of repos
- for loop.Scan() {
- r := loop.Next()
+ all := fc.SortByGoPath() // get the list of repos
+ for all.Scan() {
+ r := all.Next()
if r.GoPath == gopath {
// exact gopath match
if r.Writable {
@@ -98,9 +98,9 @@ func (fc *ForgeConfigs) DebName(gopath string) string {
// get "zookeeper" from "go.wit.com/apps/zookeeper"
normalBase := filepath.Base(gopath)
- loop := fc.SortByGoPath()
- for loop.Scan() {
- r := loop.Next()
+ all := fc.SortByGoPath()
+ for all.Scan() {
+ r := all.Next()
if r.GoPath == gopath {
// returns "zookeeper-go" for "go.wit.com/apps/zookeeper"
if r.DebName != "" {
@@ -127,9 +127,9 @@ func (fc *ForgeConfigs) IsPrivate(thing string) bool {
// sort by path means the simple 'match' logic
// here works in the sense the last directory match
// is the one that is used
- loop := fc.SortByGoPath() // get the list of repos
- for loop.Scan() {
- r := loop.Next()
+ all := fc.SortByGoPath() // get the list of repos
+ for all.Scan() {
+ r := all.Next()
if r.GoPath == thing {
// if private is set here, then ok, otherwise
// still check if a Directory match exists
@@ -168,9 +168,9 @@ func (fc *ForgeConfigs) IsPrivate(thing string) bool {
func (fc *ForgeConfigs) IsFavorite(thing string) bool {
var match *ForgeConfig
- loop := fc.SortByGoPath() // get the list of repos
- for loop.Scan() {
- r := loop.Next()
+ all := fc.SortByGoPath() // get the list of repos
+ for all.Scan() {
+ r := all.Next()
if r.GoPath == thing {
if r.Favorite {
return true
@@ -201,9 +201,9 @@ func (fc *ForgeConfigs) IsFavorite(thing string) bool {
func (fc *ForgeConfigs) IsWritable(thing string) bool {
var match *ForgeConfig
- loop := fc.SortByGoPath() // get the list of repos
- for loop.Scan() {
- r := loop.Next()
+ all := fc.SortByGoPath() // get the list of repos
+ for all.Scan() {
+ r := all.Next()
if r.GoPath == thing {
if r.Writable {
return true