aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-10-01 21:47:12 +0200
committerMichael Muré <batolettre@gmail.com>2018-10-01 21:47:12 +0200
commita4b218adec59d5c7de564dfeef4729c4615906d6 (patch)
tree7113098f56fbd03ea77d38ea1eba1ef4ae125a63 /cache
parent97d94948536b119b4825d30c546248f91c41988d (diff)
downloadgit-bug-a4b218adec59d5c7de564dfeef4729c4615906d6.tar.gz
add documentation
Diffstat (limited to 'cache')
-rw-r--r--cache/repo_cache.go3
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)