From a4b218adec59d5c7de564dfeef4729c4615906d6 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Mon, 1 Oct 2018 21:47:12 +0200 Subject: add documentation --- cache/repo_cache.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cache') 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) -- cgit