summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-12 20:05:57 -0600
committerJeff Carr <[email protected]>2025-01-12 20:05:57 -0600
commit4aa85a2f0f2e90e4df4cbf37857b800bb098c895 (patch)
tree22d4764aaa11f2555274e1f20ccbec2a1ca07ffd
parent7df10fba519944c1dae55625b10b0677b639febb (diff)
fixes for new autogenpb
-rw-r--r--config.go6
-rw-r--r--gitTag.byAge.go4
-rw-r--r--goDep.helpers.go2
-rw-r--r--goDep.parseGoSum.go2
-rw-r--r--goDep.proto2
-rw-r--r--repo.new.go2
6 files changed, 7 insertions, 11 deletions
diff --git a/config.go b/config.go
index 4d9cdb4..e59c873 100644
--- a/config.go
+++ b/config.go
@@ -62,11 +62,7 @@ func (all *Repos) ConfigLoad() error {
func (all *Repos) sampleConfig() {
newr := new(Repo)
newr.FullPath = "/opt/forge/dummyentry"
- if all.Append(newr) {
- log.Info("added", newr.GetGoPath(), "ok")
- } else {
- log.Info("added", newr.GetGoPath(), "failed")
- }
+ all.Append(newr)
}
func loadFile(fullname string) ([]byte, error) {
diff --git a/gitTag.byAge.go b/gitTag.byAge.go
index 8fa52e9..2b68b98 100644
--- a/gitTag.byAge.go
+++ b/gitTag.byAge.go
@@ -23,11 +23,11 @@ func (all *GitTags) newSort() *GitTagIterator {
// all this code below is junk and seamingly wrong
func (all *GitTags) SortByAge() *GitTagIterator {
- packs := all.selectAllGitTag()
+ packs := all.selectAllGitTags()
sort.Sort(GitTagAge(packs))
- iterator := NewGitTagIterator(packs)
+ iterator := newGitTagIterator(packs)
return iterator
}
diff --git a/goDep.helpers.go b/goDep.helpers.go
index bb30151..271e67b 100644
--- a/goDep.helpers.go
+++ b/goDep.helpers.go
@@ -13,7 +13,7 @@ func (repo *Repo) DeleteGoDepByHash(hash string) {
// enforces no duplicate package names
func (repo *Repo) AppendGoDep(newP *GoDep) bool {
- return repo.GoDeps.AppendUniqueGoPath(newP)
+ return repo.GoDeps.AppendByGoPath(newP)
}
// returns time.Duration since last scan of go.sum & go.mod
diff --git a/goDep.parseGoSum.go b/goDep.parseGoSum.go
index 8a8e434..baed7f4 100644
--- a/goDep.parseGoSum.go
+++ b/goDep.parseGoSum.go
@@ -54,7 +54,7 @@ func (repo *Repo) ParseGoSum() bool {
if repo.GoDeps == nil {
repo.GoDeps = new(GoDeps)
}
- repo.GoDeps.AppendUniqueGoPath(&new1)
+ repo.GoDeps.AppendByGoPath(&new1)
} else {
log.Info("gitpb.ParseGoSum() go.sum parse error invalid:", line)
return false
diff --git a/goDep.proto b/goDep.proto
index 624b9a8..8fdab1b 100644
--- a/goDep.proto
+++ b/goDep.proto
@@ -19,5 +19,5 @@ message GoDep { // `autogenpb:marshal`
message GoDeps { // `autogenpb:marshal`
string uuid = 1; // `autogenpb:uuid:`
string version = 2; // `autogenpb:version`
- repeated GoDep goDeps = 3;
+ repeated GoDep goDeps = 3; // `autogenpb:unique` `autogenpb:sort`
}
diff --git a/repo.new.go b/repo.new.go
index 8ebe78c..f229dcc 100644
--- a/repo.new.go
+++ b/repo.new.go
@@ -34,7 +34,7 @@ func (all *Repos) NewGoRepo(fullpath string, gopath string) (*Repo, error) {
// everything happens in here
newr.Reload()
- if all.AppendUniqueFullPath(&newr) {
+ if all.AppendByFullPath(&newr) {
// worked
return &newr, nil
} else {