From 57212b9b5c5705d088446a9830c34973300a5ac3 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 3 Oct 2025 10:04:14 -0500 Subject: add some config examples --- config.common.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'config.common.go') diff --git a/config.common.go b/config.common.go index 5a230a8..ff70e08 100644 --- a/config.common.go +++ b/config.common.go @@ -41,7 +41,7 @@ func (all *ForgeConfigs) UpdateGoPath(name string, gopath string) bool { func (fc *ForgeConfigs) IsReadOnly(gopath string) bool { var match *ForgeConfig - all := fc.SortByGoPath() // get the list of repos + all := fc.All() // get the list of repos for all.Scan() { r := all.Next() if r.GoPath == gopath { @@ -102,7 +102,7 @@ func (fc *ForgeConfigs) DebName(gopath string) string { // get "zookeeper" from "go.wit.com/apps/zookeeper" normalBase := filepath.Base(gopath) - all := fc.SortByGoPath() + all := fc.All() for all.Scan() { r := all.Next() if r.GoPath == gopath { @@ -142,7 +142,7 @@ 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 - all := fc.SortByGoPath() // get the list of repos + all := fc.All() // get the list of repos for all.Scan() { r := all.Next() if r.GoPath == thing { @@ -183,7 +183,7 @@ func (fc *ForgeConfigs) IsPrivate(thing string) bool { func (fc *ForgeConfigs) IsFavorite(thing string) bool { var match *ForgeConfig - all := fc.SortByGoPath() // get the list of repos + all := fc.All() // get the list of repos for all.Scan() { r := all.Next() if r.GoPath == thing { @@ -216,7 +216,7 @@ func (fc *ForgeConfigs) IsFavorite(thing string) bool { func (fc *ForgeConfigs) IsWritable(thing string) bool { var match *ForgeConfig - all := fc.SortByGoPath() // get the list of repos + all := fc.All() // get the list of repos for all.Scan() { r := all.Next() if r.GoPath == thing { @@ -247,7 +247,7 @@ func (fc *ForgeConfigs) IsWritable(thing string) bool { func (fc *ForgeConfigs) FindUserBranch(thing string) string { var match *ForgeConfig - all := fc.SortByGoPath() // get the list of repos + all := fc.All() // get the list of repos for all.Scan() { r := all.Next() if r.GoPath == thing { @@ -278,7 +278,7 @@ func (fc *ForgeConfigs) FindUserBranch(thing string) string { func (fc *ForgeConfigs) FindDevelBranch(thing string) string { var match *ForgeConfig - all := fc.SortByGoPath() // get the list of repos + all := fc.All() // get the list of repos for all.Scan() { r := all.Next() if r.GoPath == thing { @@ -309,7 +309,7 @@ func (fc *ForgeConfigs) FindDevelBranch(thing string) string { func (fc *ForgeConfigs) FindMasterBranch(thing string) string { var match *ForgeConfig - all := fc.SortByGoPath() // get the list of repos + all := fc.All() // get the list of repos for all.Scan() { r := all.Next() if r.GoPath == thing { -- cgit v1.2.3