diff options
Diffstat (limited to 'cache/repo_cache.go')
-rw-r--r-- | cache/repo_cache.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cache/repo_cache.go b/cache/repo_cache.go index 2b0fa360..fd5d0865 100644 --- a/cache/repo_cache.go +++ b/cache/repo_cache.go @@ -386,6 +386,15 @@ func (c *RepoCache) ResolveBug(id string) (*BugCache, error) { return cached, nil } +// ResolveBugExcerpt retrieve a BugExcerpt matching the exact given id +func (c *RepoCache) ResolveBugExcerpt(id string) (*BugExcerpt, error) { + e, ok := c.excerpts[id] + if !ok { + return nil, bug.ErrBugNotExist + } + + return e, nil +} // ResolveBugExcerpt retrieve a BugExcerpt matching the exact given id func (c *RepoCache) ResolveBugExcerpt(id string) (*BugExcerpt, error) { |