Esempio n. 1
0
/**
 * Get the subject of 'thread' as a UTF-8 string.
 *
 * The subject is taken from the first message (according to the query
 * order---see notmuch_query_set_sort) in the query results that
 * belongs to this thread.
 *
 * The returned string belongs to 'thread' and as such, should not be
 * modified by the caller and will only be valid for as long as the
 * thread is valid, (which is until notmuch_thread_destroy or until
 * the query from which it derived is destroyed).
 */
func (self *Thread) GetSubject() string {
	if self.thread == nil {
		return ""
	}
	str := C.notmuch_thread_get_subject(self.thread)
	if str == nil {
		return ""
	}
	return C.GoString(str)
}
Esempio n. 2
0
// Subject returns the subject of a thread.
func (t *Thread) Subject() string {
	cstr := C.notmuch_thread_get_subject(t.toC())
	str := C.GoString(cstr)
	return str
}