aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-03-10 16:27:22 +0100
committerMichael Muré <batolettre@gmail.com>2022-03-10 16:30:27 +0100
commitb11679bc80b115c61a5cdee8ff8b5f8f1f69533d (patch)
tree956495036e383caab11006239e31e591436a33cd /cache
parentdf55cc49a85eaf3a2d3c2ceb1fbcccac19fa6eb8 (diff)
downloadgit-bug-b11679bc80b115c61a5cdee8ff8b5f8f1f69533d.tar.gz
Fix a bunch of comments and documentations
Diffstat (limited to 'cache')
-rw-r--r--cache/bug_cache.go8
-rw-r--r--cache/repo_cache_bug.go2
2 files changed, 5 insertions, 5 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)
diff --git a/cache/repo_cache_bug.go b/cache/repo_cache_bug.go
index c019da68..bce01926 100644
--- a/cache/repo_cache_bug.go
+++ b/cache/repo_cache_bug.go
@@ -457,7 +457,7 @@ func (c *RepoCache) NewBugWithFiles(title string, message string, files []reposi
return c.NewBugRaw(author, time.Now().Unix(), title, message, files, nil)
}
-// NewBugWithFilesMeta create a new bug with attached files for the message, as
+// NewBugRaw create a new bug with attached files for the message, as
// well as metadata for the Create operation.
// The new bug is written in the repository (commit)
func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title string, message string, files []repository.Hash, metadata map[string]string) (*BugCache, *bug.CreateOperation, error) {