/* Add a tag to the given message. * * Return value: * * NOTMUCH_STATUS_SUCCESS: Tag successfully added to 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) AddTag(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_add_tag(self.message, c_tag)) }
// AddTag adds a tag to the message. func (m *Message) AddTag(tag string) error { ctag := C.CString(tag) defer C.free(unsafe.Pointer(ctag)) return statusErr(C.notmuch_message_add_tag(m.toC(), ctag)) }