/* Return a list of all tags found in the database. * * This function creates a list of all tags found in the database. The * resulting list contains all tags from all messages found in the database. * * On error this function returns NULL. */ func (self *Database) GetAllTags() *Tags { tags := C.notmuch_database_get_all_tags(self.db) if tags == nil { return nil } return &Tags{tags: tags} }
// Tags returns the list of all tags in the database. func (db *DB) Tags() (*Tags, error) { ctags := C.notmuch_database_get_all_tags(db.toC()) if ctags == nil { return nil, ErrUnknownError } tags := &Tags{ cptr: unsafe.Pointer(ctags), parent: (*cStruct)(db), } setGcClose(tags) return tags, nil }