MCPcopy Index your code
hub / github.com/git-bug/git-bug / Validate

Method Validate

entities/bug/op_edit_comment.go:88–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86}
87
88func (op *EditCommentOperation) Validate() error {
89 if err := op.OpBase.Validate(op, EditCommentOp); err != nil {
90 return err
91 }
92
93 if err := op.Target.Validate(); err != nil {
94 return errors.Wrap(err, "target hash is invalid")
95 }
96
97 if !text.Safe(op.Message) {
98 return fmt.Errorf("message is not fully printable")
99 }
100
101 return nil
102}
103
104func NewEditCommentOp(author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash) *EditCommentOperation {
105 return &EditCommentOperation{

Callers

nothing calls this directly

Calls 3

SafeFunction · 0.92
ErrorfMethod · 0.80
ValidateMethod · 0.65

Tested by

no test coverage detected