diff options
Diffstat (limited to 'cache')
-rw-r--r-- | cache/bug_cache.go | 4 | ||||
-rw-r--r-- | cache/repo_cache.go | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/cache/bug_cache.go b/cache/bug_cache.go index b0dbb6cc..4fdc7d62 100644 --- a/cache/bug_cache.go +++ b/cache/bug_cache.go @@ -22,6 +22,10 @@ func (c *BugCache) Snapshot() *bug.Snapshot { return c.bug.Snapshot() } +func (c *BugCache) Id() string { + return c.bug.Id() +} + func (c *BugCache) HumanId() string { return c.bug.HumanId() } diff --git a/cache/repo_cache.go b/cache/repo_cache.go index ce7630a3..720857ce 100644 --- a/cache/repo_cache.go +++ b/cache/repo_cache.go @@ -207,6 +207,10 @@ func (c *RepoCache) ResolveBugPrefix(prefix string) (*BugCache, error) { return nil, fmt.Errorf("Multiple matching bug found:\n%s", strings.Join(matching, "\n")) } + if len(matching) == 0 { + return nil, bug.ErrBugNotExist + } + return c.ResolveBug(matching[0]) } |