Open is a convenience function to change a bugs state to Open
(b Interface, author identity.Interface, unixTime int64, metadata map[string]string)
| 73 | |
| 74 | // Open is a convenience function to change a bugs state to Open |
| 75 | func Open(b Interface, author identity.Interface, unixTime int64, metadata map[string]string) (*SetStatusOperation, error) { |
| 76 | op := NewSetStatusOp(author, unixTime, common.OpenStatus) |
| 77 | for key, value := range metadata { |
| 78 | op.SetMetadata(key, value) |
| 79 | } |
| 80 | if err := op.Validate(); err != nil { |
| 81 | return nil, err |
| 82 | } |
| 83 | b.Append(op) |
| 84 | return op, nil |
| 85 | } |
| 86 | |
| 87 | // Close is a convenience function to change a bugs state to Close |
| 88 | func Close(b Interface, author identity.Interface, unixTime int64, metadata map[string]string) (*SetStatusOperation, error) { |
no test coverage detected