fixes for new autogenpb
This commit is contained in:
parent
7df10fba51
commit
4aa85a2f0f
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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`
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue