summaryrefslogtreecommitdiff
path: root/repo.new.go
diff options
context:
space:
mode:
Diffstat (limited to 'repo.new.go')
-rw-r--r--repo.new.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/repo.new.go b/repo.new.go
index f599c93..c7f000f 100644
--- a/repo.new.go
+++ b/repo.new.go
@@ -9,10 +9,10 @@ import (
// TODO: try adding python, rails, perl, rust, other language things?
// I probably will never have time to try that, but I'd take patches for anyone
// that might see this note and feel so inclined.
-func (r *Repos) InitNewGoPath(basepath string, gopath string) *Repo {
- if oldr := r.FindByPath(gopath); oldr != nil {
+func (all *Repos) NewGoPath(basepath string, gopath string) *Repo {
+ if r := all.FindByGoPath(gopath); r != nil {
// already had this gopath
- return oldr
+ return r
}
// add a new one here
newr := Repo{
@@ -21,6 +21,6 @@ func (r *Repos) InitNewGoPath(basepath string, gopath string) *Repo {
}
newr.UpdateGit()
- r.add(&newr)
+ all.add(&newr)
return &newr
}