aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_edit_comment.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-08 16:17:15 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-08 16:17:15 +0100
commit97bc5ccd229b7b438262a84e3c42783b4d4a82af (patch)
tree6e5ef89c8ecce28599e9623d441a18406b2f2f93 /bug/op_edit_comment.go
parent77dc783fcb64adf67d10fc3232c4f06f8e3d5392 (diff)
downloadgit-bug-97bc5ccd229b7b438262a84e3c42783b4d4a82af.tar.gz
various cleanups suggested by golang-ci
Diffstat (limited to 'bug/op_edit_comment.go')
-rw-r--r--bug/op_edit_comment.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/bug/op_edit_comment.go b/bug/op_edit_comment.go
index a37ce8f7..48020421 100644
--- a/bug/op_edit_comment.go
+++ b/bug/op_edit_comment.go
@@ -59,14 +59,11 @@ func (op *EditCommentOperation) Apply(snapshot *Snapshot) {
UnixTime: timestamp.Timestamp(op.UnixTime),
}
- switch target.(type) {
+ switch target := target.(type) {
case *CreateTimelineItem:
- item := target.(*CreateTimelineItem)
- item.Append(comment)
-
+ target.Append(comment)
case *AddCommentTimelineItem:
- item := target.(*AddCommentTimelineItem)
- item.Append(comment)
+ target.Append(comment)
}
// Updating the corresponding comment