diff options
| author | Jeff Carr <[email protected]> | 2024-02-13 16:17:29 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-13 16:17:29 -0600 |
| commit | 95fd6ca05a28774ad374801984a4f62c202835d3 (patch) | |
| tree | f54454217241110972c50977bef5f4d8d7854820 /gitConfig.go | |
| parent | d7a0246af9e3b9a970f4bef2e4e5bdcb124f793a (diff) | |
check go.wit.com is mapping a repo
Diffstat (limited to 'gitConfig.go')
| -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 { |
