Beispiel #1
0
/* Is the given 'tags' iterator pointing at a valid tag.
 *
 * When this function returns TRUE, notmuch_tags_get will return a
 * valid string. Whereas when this function returns FALSE,
 * notmuch_tags_get will return NULL.
 *
 * See the documentation of notmuch_message_get_tags for example code
 * showing how to iterate over a notmuch_tags_t object.
 */
func (self *Tags) Valid() bool {
	if self.tags == nil {
		return false
	}
	v := C.notmuch_tags_valid(self.tags)
	if v == 0 {
		return false
	}
	return true
}
Beispiel #2
0
func (ts *Tags) valid() bool {
	cbool := C.notmuch_tags_valid(ts.toC())
	return int(cbool) != 0
}