Beispiel #1
0
/* Remove a tag from the given message.
 *
 * Return value:
 *
 * NOTMUCH_STATUS_SUCCESS: Tag successfully removed from message
 *
 * NOTMUCH_STATUS_NULL_POINTER: The 'tag' argument is NULL
 *
 * NOTMUCH_STATUS_TAG_TOO_LONG: The length of 'tag' is too long
 *	(exceeds NOTMUCH_TAG_MAX)
 *
 * NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only
 *	mode so message cannot be modified.
 */
func (self *Message) RemoveTag(tag string) Status {
	if self.message == nil {
		return STATUS_NULL_POINTER
	}
	c_tag := C.CString(tag)
	defer C.free(unsafe.Pointer(c_tag))

	return Status(C.notmuch_message_remove_tag(self.message, c_tag))
}
Beispiel #2
0
// RemoveTag removes a tag from the message.
func (m *Message) RemoveTag(tag string) error {
	ctag := C.CString(tag)
	defer C.free(unsafe.Pointer(ctag))
	return statusErr(C.notmuch_message_remove_tag(m.toC(), ctag))
}