diff options
| -rw-r--r-- | gitConfig.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gitConfig.go b/gitConfig.go index 295a583..881d330 100644 --- a/gitConfig.go +++ b/gitConfig.go @@ -191,6 +191,18 @@ func (rs *RepoStatus) readGitConfig() error { return nil } +func (rs *RepoStatus) GitURL() string { + origin, ok := rs.gitConfig.remotes["origin"] + if ok { + return origin.url + } + for i, s := range rs.gitConfig.remotes { + log.Log(WARN, "remote:", i, s.url) + } + log.Log(WARN, "GitURL() repo has non-standard origin or is not uploaded") + return "" +} + // this checks to see if the repo is truly not dependent on _anything_ else // like spew or lib/widget func (rs *RepoStatus) CheckPrimativeGoMod() bool { |
