diff options
| author | Jeff Carr <[email protected]> | 2024-12-17 06:36:28 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-17 06:36:28 -0600 |
| commit | 5d232293a002cc4b5bcb949a0e329337ab4e90b4 (patch) | |
| tree | e5f7422210227239f04601b6f76f9a78ca442a60 /common.go | |
| parent | 1d124c7dbfdfd9bc4cb82f74b4883791c9f185b8 (diff) | |
lots of cleanups
Diffstat (limited to 'common.go')
| -rw-r--r-- | common.go | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -33,10 +33,10 @@ func (r *RepoList) FindByName(name string) *RepoRow { loop := r.ReposSortByName() for loop.Scan() { repo := loop.Repo() - if repo.pb.GoPath == name { + if repo.pb.GetGoPath() == name { return repo } - base := filepath.Base(repo.GoPath()) + base := filepath.Base(repo.GetGoPath()) if base == name { return repo } @@ -84,11 +84,11 @@ func (r *RepoRow) Scan() int { // returns a name for human consuption only // todo: implement nicknames func (rs *RepoRow) Name() string { - return rs.pb.GoPath + return rs.pb.GetGoPath() } -func (r *RepoRow) GoPath() string { - return r.pb.GoPath +func (r *RepoRow) GetGoPath() string { + return r.pb.GetGoPath() } func (r *RepoRow) CheckDirty() bool { @@ -100,7 +100,7 @@ func (r *RepoRow) IsDirty() bool { } func (r *RepoRow) RepoType() string { - return r.pb.RepoType() + return r.pb.GetRepoType() } func (r *RepoRow) ReadOnly() bool { @@ -188,17 +188,17 @@ func (rl *RepoList) MakeGoWork() error { for _, k := range keys { repo := rl.allrepos[k] - if repo.pb.GoPath == "" { + if repo.pb.GetGoPath() == "" { // skip repos that aren't go // todo: handle non-flat repos? - log.Info("SKIPPED REPO", repo.pb.GoPath) + log.Info("SKIPPED REPO", repo.pb.GetGoPath()) continue } if repo.pb.Exists("go.mod") { - fmt.Fprintln(f, "\t"+repo.pb.GoPath) - log.Info("ADDING REPO", goSrcDir, repo.pb.GoPath) + fmt.Fprintln(f, "\t"+repo.pb.GetGoPath()) + log.Info("ADDING REPO", goSrcDir, repo.pb.GetGoPath()) } else { - log.Log(REPO, "missing go.mod for", repo.pb.GoPath) + log.Log(REPO, "missing go.mod for", repo.pb.GetGoPath()) } } fmt.Fprintln(f, ")") |
