aboutsummaryrefslogtreecommitdiffstats
path: root/bug
diff options
context:
space:
mode:
Diffstat (limited to 'bug')
-rw-r--r--bug/op_add_comment.go4
-rw-r--r--bug/op_create.go4
-rw-r--r--bug/op_edit_comment.go4
-rw-r--r--bug/op_label_change.go4
-rw-r--r--bug/op_set_status.go4
-rw-r--r--bug/op_set_title.go4
-rw-r--r--bug/operation.go4
-rw-r--r--bug/operation_test.go2
8 files changed, 15 insertions, 15 deletions
diff --git a/bug/op_add_comment.go b/bug/op_add_comment.go
index 156a8f71..3b2c2b76 100644
--- a/bug/op_add_comment.go
+++ b/bug/op_add_comment.go
@@ -11,14 +11,14 @@ var _ Operation = &AddCommentOperation{}
// AddCommentOperation will add a new comment in the bug
type AddCommentOperation struct {
- *OpBase
+ OpBase
Message string `json:"message"`
// TODO: change for a map[string]util.hash to store the filename ?
Files []git.Hash `json:"files"`
}
func (op *AddCommentOperation) base() *OpBase {
- return op.OpBase
+ return &op.OpBase
}
func (op *AddCommentOperation) Hash() (git.Hash, error) {
diff --git a/bug/op_create.go b/bug/op_create.go
index 200da4ae..2ac85ee1 100644
--- a/bug/op_create.go
+++ b/bug/op_create.go
@@ -12,14 +12,14 @@ var _ Operation = &CreateOperation{}
// CreateOperation define the initial creation of a bug
type CreateOperation struct {
- *OpBase
+ OpBase
Title string `json:"title"`
Message string `json:"message"`
Files []git.Hash `json:"files"`
}
func (op *CreateOperation) base() *OpBase {
- return op.OpBase
+ return &op.OpBase
}
func (op *CreateOperation) Hash() (git.Hash, error) {
diff --git a/bug/op_edit_comment.go b/bug/op_edit_comment.go
index 78976af7..ec767ed4 100644
--- a/bug/op_edit_comment.go
+++ b/bug/op_edit_comment.go
@@ -11,14 +11,14 @@ var _ Operation = &EditCommentOperation{}
// EditCommentOperation will change a comment in the bug
type EditCommentOperation struct {
- *OpBase
+ OpBase
Target git.Hash `json:"target"`
Message string `json:"message"`
Files []git.Hash `json:"files"`
}
func (op *EditCommentOperation) base() *OpBase {
- return op.OpBase
+ return &op.OpBase
}
func (op *EditCommentOperation) Hash() (git.Hash, error) {
diff --git a/bug/op_label_change.go b/bug/op_label_change.go
index b025be81..006afd88 100644
--- a/bug/op_label_change.go
+++ b/bug/op_label_change.go
@@ -12,13 +12,13 @@ var _ Operation = &LabelChangeOperation{}
// LabelChangeOperation define a Bug operation to add or remove labels
type LabelChangeOperation struct {
- *OpBase
+ OpBase
Added []Label `json:"added"`
Removed []Label `json:"removed"`
}
func (op *LabelChangeOperation) base() *OpBase {
- return op.OpBase
+ return &op.OpBase
}
func (op *LabelChangeOperation) Hash() (git.Hash, error) {
diff --git a/bug/op_set_status.go b/bug/op_set_status.go
index 7e9f4314..e40d349d 100644
--- a/bug/op_set_status.go
+++ b/bug/op_set_status.go
@@ -9,12 +9,12 @@ var _ Operation = &SetStatusOperation{}
// SetStatusOperation will change the status of a bug
type SetStatusOperation struct {
- *OpBase
+ OpBase
Status Status `json:"status"`
}
func (op *SetStatusOperation) base() *OpBase {
- return op.OpBase
+ return &op.OpBase
}
func (op *SetStatusOperation) Hash() (git.Hash, error) {
diff --git a/bug/op_set_title.go b/bug/op_set_title.go
index fd964a30..9c523a2c 100644
--- a/bug/op_set_title.go
+++ b/bug/op_set_title.go
@@ -12,13 +12,13 @@ var _ Operation = &SetTitleOperation{}
// SetTitleOperation will change the title of a bug
type SetTitleOperation struct {
- *OpBase
+ OpBase
Title string `json:"title"`
Was string `json:"was"`
}
func (op *SetTitleOperation) base() *OpBase {
- return op.OpBase
+ return &op.OpBase
}
func (op *SetTitleOperation) Hash() (git.Hash, error) {
diff --git a/bug/operation.go b/bug/operation.go
index 91b77e56..08d44d0c 100644
--- a/bug/operation.go
+++ b/bug/operation.go
@@ -80,8 +80,8 @@ type OpBase struct {
}
// newOpBase is the constructor for an OpBase
-func newOpBase(opType OperationType, author Person, unixTime int64) *OpBase {
- return &OpBase{
+func newOpBase(opType OperationType, author Person, unixTime int64) OpBase {
+ return OpBase{
OperationType: opType,
Author: author,
UnixTime: unixTime,
diff --git a/bug/operation_test.go b/bug/operation_test.go
index 098cf138..2bf836f0 100644
--- a/bug/operation_test.go
+++ b/bug/operation_test.go
@@ -36,7 +36,7 @@ func TestValidate(t *testing.T) {
NewSetStatusOp(Person{Name: "René Descartes", Email: "rene@descartes.fr\u001b"}, unix, ClosedStatus),
NewSetStatusOp(Person{Name: "René \nDescartes", Email: "rene@descartes.fr"}, unix, ClosedStatus),
NewSetStatusOp(Person{Name: "René Descartes", Email: "rene@\ndescartes.fr"}, unix, ClosedStatus),
- &CreateOperation{OpBase: &OpBase{
+ &CreateOperation{OpBase: OpBase{
Author: rene,
UnixTime: 0,
OperationType: CreateOp,