aboutsummaryrefslogtreecommitdiffstats
path: root/bug/comment.go
diff options
context:
space:
mode:
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
}