diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-17 19:28:37 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-17 19:28:37 +0200 |
commit | 76ac1787b8de8698b878d1837c5fa8f6fe6403fc (patch) | |
tree | 2261d605eb533bc5f037887a983da0039281c9f5 /bug/snapshot.go | |
parent | 7b19b10e19e5dbbae79a47d3e4338b15b3e8d972 (diff) | |
download | git-bug-76ac1787b8de8698b878d1837c5fa8f6fe6403fc.tar.gz |
add bug status + open/close commands
Diffstat (limited to 'bug/snapshot.go')
-rw-r--r-- | bug/snapshot.go | 12 |
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, |