diff options
author | Michael Muré <batolettre@gmail.com> | 2022-11-19 11:33:12 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-11-28 17:20:25 +0100 |
commit | 0ac39a7ab5db077fcf0df827e32bf6e625e980da (patch) | |
tree | e453d6fd244cb322bdc6305c0088aa3c0331b075 /entities/bug | |
parent | c6bb6b9c7ecddb679966b1561e2e909a9ee5e8cd (diff) | |
download | git-bug-0ac39a7ab5db077fcf0df827e32bf6e625e980da.tar.gz |
WIP
Diffstat (limited to 'entities/bug')
-rw-r--r-- | entities/bug/err.go | 17 | ||||
-rw-r--r-- | entities/bug/operation.go | 7 |
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]{} |