aboutsummaryrefslogtreecommitdiffstats
path: root/bug/snapshot.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/snapshot.go')
-rw-r--r--bug/snapshot.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/bug/snapshot.go b/bug/snapshot.go
index 9b9acf87..53a010bb 100644
--- a/bug/snapshot.go
+++ b/bug/snapshot.go
@@ -7,11 +7,23 @@ import (
// Snapshot is a compiled form of the Bug data structure used for storage and merge
type Snapshot struct {
+ id string
+ Status Status
Title string
Comments []Comment
Labels []Label
}
+// Return the Bug identifier
+func (snap Snapshot) Id() string {
+ return snap.id
+}
+
+// Return the Bug identifier truncated for human consumption
+func (snap Snapshot) HumanId() string {
+ return fmt.Sprintf("%.8s", snap.id)
+}
+
func (snap Snapshot) Summary() string {
return fmt.Sprintf("c:%d l:%d %s",
len(snap.Comments)-1,