diff options
| author | Jeff Carr <[email protected]> | 2024-12-16 00:19:23 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-16 00:19:23 -0600 |
| commit | 6922059a0b58904263c7119ebd8e96aabbb3053a (patch) | |
| tree | 2dd5c66b5e4ecaa5673a0873e654ebcdfc8c4375 /build.go | |
| parent | 0b09db58dd5b1b628729300484af66a21cf9a718 (diff) | |
sortcut for finding Getwd() repov0.0.35
Diffstat (limited to 'build.go')
| -rw-r--r-- | build.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -198,3 +198,11 @@ func (f *Forge) runAutogenpb(repo *gitpb.Repo) error { } return nil } + +// sortcut to find +func (f *Forge) FindWorkingDirRepo() *gitpb.Repo { + pwd, _ := os.Getwd() + basedir := strings.TrimPrefix(pwd, f.GetGoSrc()) + basedir = strings.Trim(basedir, "/") + return f.Repos.FindByGoPath(basedir) +} |
