git-bug/bug/operation.go
2018-07-14 22:17:37 +02:00

24 lines
321 B
Go

package bug
type OperationType int
const (
UNKNOWN OperationType = iota
CREATE
SET_TITLE
ADD_COMMENT
)
type Operation interface {
OpType() OperationType
Apply(snapshot Snapshot) Snapshot
}
type OpBase struct {
OperationType OperationType
}
func (op OpBase) OpType() OperationType {
return op.OperationType
}