diff options
Diffstat (limited to 'repoNew.go')
| -rw-r--r-- | repoNew.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -15,7 +15,7 @@ import ( ) func (f *Forge) NewGoRepo(gopath string, url string) (*gitpb.Repo, error) { - fullpath := filepath.Join(f.Config.ReposDir, gopath) + fullpath := filepath.Join(config.Get("ReposDir"), gopath) test := f.Repos.FindByFullPath(fullpath) if test != nil { return test, nil @@ -192,12 +192,12 @@ func (f *Forge) configUserBranchName(repo *gitpb.Repo) string { if uname != "" { return uname } - if f.Config.Username == "" { + if config.Get("username") == "" { // something is wrong! } // use the os.Username - uname = f.Config.Username + uname = config.Get("username") return uname } @@ -230,7 +230,7 @@ func (f *Forge) AddFullPath(fulldir string) *gitpb.Repo { // } func (f *Forge) FindByNamespace(gopath string) *gitpb.Repo { - fullpath := filepath.Join(f.Config.ReposDir, gopath) + fullpath := filepath.Join(config.Get("ReposDir"), gopath) return f.Repos.FindByFullPath(fullpath) } @@ -257,6 +257,6 @@ func (f *Forge) FindAnyPath(dir string) *gitpb.Repo { } func (f *Forge) DeleteByGoPath(gopath string) bool { - fullpath := filepath.Join(f.Config.ReposDir, gopath) + fullpath := filepath.Join(config.Get("ReposDir"), gopath) return f.Repos.DeleteByFullPath(fullpath) } |
