diff options
author | Michael Muré <batolettre@gmail.com> | 2018-10-01 21:47:12 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-10-01 21:47:12 +0200 |
commit | a4b218adec59d5c7de564dfeef4729c4615906d6 (patch) | |
tree | 7113098f56fbd03ea77d38ea1eba1ef4ae125a63 /cache | |
parent | 97d94948536b119b4825d30c546248f91c41988d (diff) | |
download | git-bug-a4b218adec59d5c7de564dfeef4729c4615906d6.tar.gz |
add documentation
Diffstat (limited to 'cache')
-rw-r--r-- | cache/repo_cache.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cache/repo_cache.go b/cache/repo_cache.go index 0de5bf07..ecfb7131 100644 --- a/cache/repo_cache.go +++ b/cache/repo_cache.go @@ -213,6 +213,7 @@ func (c *RepoCache) buildCache() error { return nil } +// ResolveBug retrieve a bug matching the exact given id func (c *RepoCache) ResolveBug(id string) (*BugCache, error) { cached, ok := c.bugs[id] if ok { @@ -230,6 +231,8 @@ func (c *RepoCache) ResolveBug(id string) (*BugCache, error) { return cached, nil } +// ResolveBugPrefix retrieve a bug matching an id prefix. It fails if multiple +// bugs match. func (c *RepoCache) ResolveBugPrefix(prefix string) (*BugCache, error) { // preallocate but empty matching := make([]string, 0, 5) |