diff options
Diffstat (limited to 'entities/bug')
-rw-r--r-- | entities/bug/bug.go | 4 | ||||
-rw-r--r-- | entities/bug/op_add_comment.go | 1 | ||||
-rw-r--r-- | entities/bug/snapshot.go | 8 |
3 files changed, 7 insertions, 6 deletions
diff --git a/entities/bug/bug.go b/entities/bug/bug.go index ab873ed8..6c440433 100644 --- a/entities/bug/bug.go +++ b/entities/bug/bug.go @@ -13,7 +13,7 @@ import ( ) var _ Interface = &Bug{} -var _ entity.Interface[*Snapshot, Operation] = &Bug{} +var _ entity.Interface[Operation, *Snapshot] = &Bug{} // 1: original format // 2: no more legacy identities @@ -34,7 +34,7 @@ var def = dag.Definition{ var ClockLoader = dag.ClockLoader(def) type Interface interface { - entity.Interface[*Snapshot, Operation] + entity.Interface[Operation, *Snapshot] } // Bug holds the data of a bug thread, organized in a way close to diff --git a/entities/bug/op_add_comment.go b/entities/bug/op_add_comment.go index 17cc5dd0..267fe731 100644 --- a/entities/bug/op_add_comment.go +++ b/entities/bug/op_add_comment.go @@ -12,6 +12,7 @@ import ( ) var _ Operation = &AddCommentOperation{} +var _ dag.Operation = &AddCommentOperation{} var _ entity.OperationWithFiles = &AddCommentOperation{} // AddCommentOperation will add a new comment in the bug diff --git a/entities/bug/snapshot.go b/entities/bug/snapshot.go index 9dbc7862..32baf42c 100644 --- a/entities/bug/snapshot.go +++ b/entities/bug/snapshot.go @@ -9,7 +9,7 @@ import ( "github.com/MichaelMure/git-bug/entity" ) -var _ entity.Snapshot = &Snapshot{} +// var _ entity.Snapshot = &Snapshot{} // Snapshot is a compiled form of the Bug data structure used for storage and merge type Snapshot struct { @@ -26,7 +26,7 @@ type Snapshot struct { Timeline []TimelineItem - Operations []entity.Operation + Operations []Operation } // Id returns the Bug identifier @@ -38,11 +38,11 @@ func (snap *Snapshot) Id() entity.Id { return snap.id } -func (snap *Snapshot) AllOperations() []entity.Operation { +func (snap *Snapshot) AllOperations() []Operation { return snap.Operations } -func (snap *Snapshot) AppendOperation(op entity.Operation) { +func (snap *Snapshot) AppendOperation(op Operation) { snap.Operations = append(snap.Operations, op) } |