aboutsummaryrefslogtreecommitdiffstats
path: root/bug/comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/comment.go')
-rw-r--r--bug/comment.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/bug/comment.go b/bug/comment.go
index 5db0b18d..47c1ff05 100644
--- a/bug/comment.go
+++ b/bug/comment.go
@@ -1,6 +1,7 @@
package bug
import (
+ "github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/util/git"
"github.com/MichaelMure/git-bug/util/timestamp"
@@ -9,7 +10,7 @@ import (
// Comment represent a comment in a Bug
type Comment struct {
- id string
+ id entity.Id
Author identity.Interface
Message string
Files []git.Hash
@@ -20,7 +21,7 @@ type Comment struct {
}
// Id return the Comment identifier
-func (c Comment) Id() string {
+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)
@@ -29,11 +30,6 @@ func (c Comment) Id() string {
return c.id
}
-// HumanId return the Comment identifier truncated for human consumption
-func (c Comment) HumanId() string {
- return FormatHumanID(c.Id())
-}
-
// FormatTimeRel format the UnixTime of the comment for human consumption
func (c Comment) FormatTimeRel() string {
return humanize.Time(c.UnixTime.Time())