aboutsummaryrefslogtreecommitdiffstats
path: root/entities/bug
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-11-19 11:33:12 +0100
committerMichael Muré <batolettre@gmail.com>2022-11-28 17:20:25 +0100
commit0ac39a7ab5db077fcf0df827e32bf6e625e980da (patch)
treee453d6fd244cb322bdc6305c0088aa3c0331b075 /entities/bug
parentc6bb6b9c7ecddb679966b1561e2e909a9ee5e8cd (diff)
downloadgit-bug-0ac39a7ab5db077fcf0df827e32bf6e625e980da.tar.gz
WIP
Diffstat (limited to 'entities/bug')
-rw-r--r--entities/bug/err.go17
-rw-r--r--entities/bug/operation.go7
2 files changed, 1 insertions, 23 deletions
diff --git a/entities/bug/err.go b/entities/bug/err.go
deleted file mode 100644
index 1bd174bb..00000000
--- a/entities/bug/err.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package bug
-
-import (
- "errors"
-
- "github.com/MichaelMure/git-bug/entity"
-)
-
-var ErrBugNotExist = errors.New("bug doesn't exist")
-
-func NewErrMultipleMatchBug(matching []entity.Id) *entity.ErrMultipleMatch {
- return entity.NewErrMultipleMatch("bug", matching)
-}
-
-func NewErrMultipleMatchOp(matching []entity.Id) *entity.ErrMultipleMatch {
- return entity.NewErrMultipleMatch("operation", matching)
-}
diff --git a/entities/bug/operation.go b/entities/bug/operation.go
index 41d80700..04365046 100644
--- a/entities/bug/operation.go
+++ b/entities/bug/operation.go
@@ -21,12 +21,7 @@ const (
)
// Operation define the interface to fulfill for an edit operation of a Bug
-type Operation interface {
- dag.Operation
-
- // Apply the operation to a Snapshot to create the final state
- Apply(snapshot *Snapshot)
-}
+type Operation = dag.OperationWithApply[*Snapshot]
// make sure that package external operations do conform to our interface
var _ Operation = &dag.NoOpOperation[*Snapshot]{}