EditComment is a convenience function to apply the operation
(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash, metadata map[string]string)
| 112 | |
| 113 | // EditComment is a convenience function to apply the operation |
| 114 | func EditComment(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) { |
| 115 | op := NewEditCommentOp(author, unixTime, target, message, files) |
| 116 | for key, val := range metadata { |
| 117 | op.SetMetadata(key, val) |
| 118 | } |
| 119 | if err := op.Validate(); err != nil { |
| 120 | return entity.UnsetCombinedId, nil, err |
| 121 | } |
| 122 | b.Append(op) |
| 123 | return entity.CombineIds(b.Id(), target), op, nil |
| 124 | } |
| 125 | |
| 126 | // EditCreateComment is a convenience function to edit the body of a bug (the first comment) |
| 127 | func EditCreateComment(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) { |
no test coverage detected