aboutsummaryrefslogtreecommitdiffstats
path: root/bug/comment.go
diff options
context:
space:
mode:
authorAlexander Scharinger <rng.dynamics@gmail.com>2021-04-11 22:08:21 +0200
committerMichael Muré <batolettre@gmail.com>2021-04-17 20:03:33 +0200
commit6a5ffd94e0c7a2b9373981f99c4798eda601f4da (patch)
treea63b24b34333dff04ac9416f9944b65ae6f67c8b /bug/comment.go
parentc71d26d513e4e5e36e6983e05dee4ad28ec664c7 (diff)
downloadgit-bug-6a5ffd94e0c7a2b9373981f99c4798eda601f4da.tar.gz
Fix ID string in order to find correct bug instance
Diffstat (limited to 'bug/comment.go')
-rw-r--r--bug/comment.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/bug/comment.go b/bug/comment.go
index 4c9d118e..c1cfc7e5 100644
--- a/bug/comment.go
+++ b/bug/comment.go
@@ -11,6 +11,8 @@ import (
// Comment represent a comment in a Bug
type Comment struct {
+ // id should be the result of entity.CombineIds with the Bug id and the id
+ // of the Operation that created the comment
id entity.Id
Author identity.Interface
Message string
@@ -24,9 +26,8 @@ type Comment struct {
// Id return the Comment identifier
func (c Comment) Id() entity.Id {
if c.id == "" {
- // simply panic as it would be a coding error
- // (using an id of an identity not stored yet)
- panic("no id yet")
+ // simply panic as it would be a coding error (no id provided at construction)
+ panic("no id")
}
return c.id
}