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

Function NewBugCache

cache/bug_cache.go:25–34  ·  view source on GitHub ↗
(b *bug.Bug, repo repository.ClockedRepo, getUserIdentity getUserIdentityFunc, entityUpdated func(id entity.Id) error)

Source from the content-addressed store, hash-verified

23}
24
25func NewBugCache(b *bug.Bug, repo repository.ClockedRepo, getUserIdentity getUserIdentityFunc, entityUpdated func(id entity.Id) error) *BugCache {
26 return &BugCache{
27 CachedEntityBase: CachedEntityBase[*bug.Snapshot, bug.Operation]{
28 repo: repo,
29 entityUpdated: entityUpdated,
30 getUserIdentity: getUserIdentity,
31 entity: &withSnapshot[*bug.Snapshot, bug.Operation]{Interface: b},
32 },
33 }
34}
35
36func (c *BugCache) AddComment(message string) (entity.CombinedId, *bug.AddCommentOperation, error) {
37 return c.AddCommentWithFiles(message, nil)

Callers 1

NewRepoCacheBugFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected