aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_edit_comment.go
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 /bug/op_edit_comment.go
parentdf55cc49a85eaf3a2d3c2ceb1fbcccac19fa6eb8 (diff)
downloadgit-bug-b11679bc80b115c61a5cdee8ff8b5f8f1f69533d.tar.gz
Fix a bunch of comments and documentations
Diffstat (limited to 'bug/op_edit_comment.go')
-rw-r--r--bug/op_edit_comment.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/bug/op_edit_comment.go b/bug/op_edit_comment.go
index a69cb599..4740f37b 100644
--- a/bug/op_edit_comment.go
+++ b/bug/op_edit_comment.go
@@ -101,7 +101,7 @@ func (op *EditCommentOperation) Validate() error {
return nil
}
-// UnmarshalJSON is a two step JSON unmarshalling
+// UnmarshalJSON is two steps JSON unmarshalling
// This workaround is necessary to avoid the inner OpBase.MarshalJSON
// overriding the outer op's MarshalJSON
func (op *EditCommentOperation) UnmarshalJSON(data []byte) error {
@@ -144,7 +144,7 @@ func NewEditCommentOp(author identity.Interface, unixTime int64, target entity.I
}
}
-// Convenience function to apply the operation
+// EditComment is a convenience function to apply the operation
func EditComment(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string) (*EditCommentOperation, error) {
return EditCommentWithFiles(b, author, unixTime, target, message, nil)
}
@@ -158,13 +158,13 @@ func EditCommentWithFiles(b Interface, author identity.Interface, unixTime int64
return editCommentOp, nil
}
-// 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 EditCreateComment(b Interface, author identity.Interface, unixTime int64, message string) (*EditCommentOperation, error) {
createOp := b.FirstOp().(*CreateOperation)
return EditComment(b, author, unixTime, createOp.Id(), message)
}
-// Convenience function to edit the body of a bug (the first comment)
+// EditCreateCommentWithFiles is a convenience function to edit the body of a bug (the first comment)
func EditCreateCommentWithFiles(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash) (*EditCommentOperation, error) {
createOp := b.FirstOp().(*CreateOperation)
return EditCommentWithFiles(b, author, unixTime, createOp.Id(), message, files)