summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-27 21:26:39 -0600
committerJeff Carr <[email protected]>2024-11-27 21:26:39 -0600
commit54a93cd5ebbaf7ed72704c1af9a8be5b8c71f5bd (patch)
treefc7118caa8b6ede187199f389e5b65ef6bb3ee61
parentf5ad4a7a41deb9f8b35c39c46d6ae31276c1e117 (diff)
protobuf 'Repos' renamed 'ForgeConfigs'
-rw-r--r--forgeConfig.sort.go10
-rw-r--r--forgeConfig/Makefile1
-rw-r--r--forgeConfig/main.go5
3 files changed, 7 insertions, 9 deletions
diff --git a/forgeConfig.sort.go b/forgeConfig.sort.go
index 4a10c32..d8fc4a1 100644
--- a/forgeConfig.sort.go
+++ b/forgeConfig.sort.go
@@ -64,7 +64,7 @@ func (r *ForgeConfigs) All() *ForgeConfigIterator {
func (r *ForgeConfigs) SortByPath() *ForgeConfigIterator {
packs := r.selectAllForgeConfigs()
- sort.Sort(ByForgeConfigPath(packs))
+ sort.Sort(byForgeConfigPath(packs))
iterator := newForgeConfigIterator(packs)
return iterator
@@ -112,11 +112,11 @@ func (r *ForgeConfigs) Len() int {
return len(r.ForgeConfigs)
}
-type ByForgeConfigPath []*ForgeConfig
+type byForgeConfigPath []*ForgeConfig
-func (a ByForgeConfigPath) Len() int { return len(a) }
-func (a ByForgeConfigPath) Less(i, j int) bool { return a[i].GoPath < a[j].GoPath }
-func (a ByForgeConfigPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
+func (a byForgeConfigPath) Len() int { return len(a) }
+func (a byForgeConfigPath) Less(i, j int) bool { return a[i].GoPath < a[j].GoPath }
+func (a byForgeConfigPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (all *ForgeConfigs) DeleteByPath(gopath string) *ForgeConfig {
forgeConfigsLock.Lock()
diff --git a/forgeConfig/Makefile b/forgeConfig/Makefile
index a83e4cc..cd23615 100644
--- a/forgeConfig/Makefile
+++ b/forgeConfig/Makefile
@@ -6,6 +6,7 @@ build:
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
./forgeConfig
FORGE_HOME=/tmp/forge ./forgeConfig
+ FORGE_HOME=/tmp/forge ./forgeConfig --list
install:
GO111MODULE=off go install \
diff --git a/forgeConfig/main.go b/forgeConfig/main.go
index fe53fe8..76d91e0 100644
--- a/forgeConfig/main.go
+++ b/forgeConfig/main.go
@@ -19,14 +19,11 @@ func main() {
if argv.List {
repos.PrintTable()
- /*
- log.Info(forgepb.RepoHeader())
loop := repos.SortByPath() // get the list of repos
for loop.Scan() {
- r := loop.Repo()
+ r := loop.Next()
log.Info("repo:", r.GoPath)
}
- */
os.Exit(0)
}