MCPcopy Index your code
hub / github.com/git-bug/git-bug / DefaultRepo

Method DefaultRepo

cache/multi_repo_cache.go:51–61  ·  view source on GitHub ↗

DefaultRepo retrieve the default repository

()

Source from the content-addressed store, hash-verified

49
50// DefaultRepo retrieve the default repository
51func (c *MultiRepoCache) DefaultRepo() (*RepoCache, error) {
52 if len(c.repos) != 1 {
53 return nil, fmt.Errorf("repository is not unique")
54 }
55
56 for _, r := range c.repos {
57 return r, nil
58 }
59
60 panic("unreachable")
61}
62
63// ResolveRepo retrieve a repository by name
64func (c *MultiRepoCache) ResolveRepo(name string) (*RepoCache, error) {

Callers 4

ServeHTTPMethod · 0.80
ServeHTTPMethod · 0.80
RepositoryMethod · 0.80
getRepoMethod · 0.80

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected