diff options
author | Michael Muré <batolettre@gmail.com> | 2020-06-26 01:02:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-26 01:02:27 +0200 |
commit | 2dd0dbb1344ae9293aae05346f977b5d5907934b (patch) | |
tree | 610ff7e381ef99827dc1b1dbc9ae4ea137fe5e21 /bug/snapshot.go | |
parent | f790083fb28ac0e68acddc9d5e7a709107a70bab (diff) | |
parent | c326007d01b623bcf883f74f31fc3e5ab3078396 (diff) | |
download | git-bug-2dd0dbb1344ae9293aae05346f977b5d5907934b.tar.gz |
Merge pull request #410 from MichaelMure/output-formatting-2
Add formatting options to the 'show' and 'user ls' commands
Diffstat (limited to 'bug/snapshot.go')
-rw-r--r-- | bug/snapshot.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/bug/snapshot.go b/bug/snapshot.go index 39366c6d..11df04b2 100644 --- a/bug/snapshot.go +++ b/bug/snapshot.go @@ -19,7 +19,7 @@ type Snapshot struct { Author identity.Interface Actors []identity.Interface Participants []identity.Interface - CreatedAt time.Time + CreateTime time.Time Timeline []TimelineItem @@ -32,7 +32,7 @@ func (snap *Snapshot) Id() entity.Id { } // Return the last time a bug was modified -func (snap *Snapshot) LastEditTime() time.Time { +func (snap *Snapshot) EditTime() time.Time { if len(snap.Operations) == 0 { return time.Unix(0, 0) } @@ -40,15 +40,6 @@ func (snap *Snapshot) LastEditTime() time.Time { return snap.Operations[len(snap.Operations)-1].Time() } -// Return the last timestamp a bug was modified -func (snap *Snapshot) LastEditUnix() int64 { - if len(snap.Operations) == 0 { - return 0 - } - - return snap.Operations[len(snap.Operations)-1].GetUnixTime() -} - // GetCreateMetadata return the creation metadata func (snap *Snapshot) GetCreateMetadata(key string) (string, bool) { return snap.Operations[0].GetMetadata(key) |