summaryrefslogtreecommitdiff
path: root/repo.sort.go
diff options
context:
space:
mode:
Diffstat (limited to 'repo.sort.go')
-rw-r--r--repo.sort.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/repo.sort.go b/repo.sort.go
index 28b0f91..b4656e6 100644
--- a/repo.sort.go
+++ b/repo.sort.go
@@ -70,43 +70,6 @@ func (r *Repos) SortByName() *RepoIterator {
return iterator
}
-// enforces no duplicate package names
-func (all *Repos) Append(newP *Repo) bool {
- repolock.Lock()
- defer repolock.Unlock()
-
- for _, p := range all.Repos {
- if p.GoPath == newP.GoPath {
- return false
- }
- }
-
- all.Repos = append(all.Repos, newP)
- return true
-}
-
-/*
-// returns time.Duration since last Update()
-func (r *Repo) LastPull() time.Duration {
- t := time.Since(r.LastPull.AsTime())
- return t
-}
-*/
-
-// find a package by gopath
-func (all *Repos) FindByPath(gopath string) *Repo {
- repolock.RLock()
- defer repolock.RUnlock()
-
- for _, p := range all.Repos {
- if p.GoPath == gopath {
- return p
- }
- }
-
- return nil
-}
-
func (all *Repos) Len() int {
repolock.RLock()
defer repolock.RUnlock()