aboutsummaryrefslogtreecommitdiffstats
path: root/cache/bug_cache.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-03-10 16:37:45 +0100
committerGitHub <noreply@github.com>2022-03-10 16:37:45 +0100
commitbf9c7e00d022d0a0210dd5e2b8c3e7d38de64099 (patch)
tree956495036e383caab11006239e31e591436a33cd /cache/bug_cache.go
parentdf55cc49a85eaf3a2d3c2ceb1fbcccac19fa6eb8 (diff)
parentb11679bc80b115c61a5cdee8ff8b5f8f1f69533d (diff)
downloadgit-bug-bf9c7e00d022d0a0210dd5e2b8c3e7d38de64099.tar.gz
Merge pull request #762 from MichaelMure/fix-comment
Fix a bunch of comments and documentations
Diffstat (limited to 'cache/bug_cache.go')
-rw-r--r--cache/bug_cache.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cache/bug_cache.go b/cache/bug_cache.go
index a248e872..0e4611da 100644
--- a/cache/bug_cache.go
+++ b/cache/bug_cache.go
@@ -12,10 +12,10 @@ import (
var ErrNoMatchingOp = fmt.Errorf("no matching operation found")
-// BugCache is a wrapper around a Bug. It provide multiple functions:
+// BugCache is a wrapper around a Bug. It provides multiple functions:
//
// 1. Provide a higher level API to use than the raw API from Bug.
-// 2. Maintain an up to date Snapshot available.
+// 2. Maintain an up-to-date Snapshot available.
// 3. Deal with concurrency.
type BugCache struct {
repoCache *RepoCache
@@ -235,7 +235,7 @@ func (c *BugCache) SetTitleRaw(author *IdentityCache, unixTime int64, title stri
return op, c.notifyUpdated()
}
-// Convenience function to edit the body of a bug (the first comment)
+// EditCreateComment is a convenience function to edit the body of a bug (the first comment)
func (c *BugCache) EditCreateComment(body string) (*bug.EditCommentOperation, error) {
author, err := c.repoCache.GetUserIdentity()
if err != nil {
@@ -245,7 +245,7 @@ func (c *BugCache) EditCreateComment(body string) (*bug.EditCommentOperation, er
return c.EditCreateCommentRaw(author, time.Now().Unix(), body, nil)
}
-// Convenience function to edit the body of a bug (the first comment)
+// EditCreateCommentRaw is a convenience function to edit the body of a bug (the first comment)
func (c *BugCache) EditCreateCommentRaw(author *IdentityCache, unixTime int64, body string, metadata map[string]string) (*bug.EditCommentOperation, error) {
c.mu.Lock()
op, err := bug.EditCreateComment(c.bug, author.Identity, unixTime, body)