diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-25 17:56:58 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-25 17:56:58 +0200 |
commit | 40c6e64e4badfd543dc98237e1aeb3d8958cfe90 (patch) | |
tree | 03a992d71a1bfa3f069a5ef179649c0cf8479764 /operations/set_status.go | |
parent | 5d7c3a76af85a857a6bb0bff5bac5282c0a9908f (diff) | |
download | git-bug-40c6e64e4badfd543dc98237e1aeb3d8958cfe90.tar.gz |
cache: add raw edit functions to allow setting up the author, the timestamp and the metadatas
Diffstat (limited to 'operations/set_status.go')
-rw-r--r-- | operations/set_status.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/operations/set_status.go b/operations/set_status.go index 6ef95320..3e7eae4a 100644 --- a/operations/set_status.go +++ b/operations/set_status.go @@ -32,16 +32,16 @@ func (op SetStatusOperation) Validate() error { return nil } -func NewSetStatusOp(author bug.Person, status bug.Status) SetStatusOperation { +func NewSetStatusOp(author bug.Person, unixTime int64, status bug.Status) SetStatusOperation { return SetStatusOperation{ - OpBase: bug.NewOpBase(bug.SetStatusOp, author), + OpBase: bug.NewOpBase(bug.SetStatusOp, author, unixTime), Status: status, } } // Convenience function to apply the operation -func Open(b bug.Interface, author bug.Person) error { - op := NewSetStatusOp(author, bug.OpenStatus) +func Open(b bug.Interface, author bug.Person, unixTime int64) error { + op := NewSetStatusOp(author, unixTime, bug.OpenStatus) if err := op.Validate(); err != nil { return err } @@ -50,8 +50,8 @@ func Open(b bug.Interface, author bug.Person) error { } // Convenience function to apply the operation -func Close(b bug.Interface, author bug.Person) error { - op := NewSetStatusOp(author, bug.ClosedStatus) +func Close(b bug.Interface, author bug.Person, unixTime int64) error { + op := NewSetStatusOp(author, unixTime, bug.ClosedStatus) if err := op.Validate(); err != nil { return err } |