[PATCH v2 04/10] go: add return status to database close method

Subject: [PATCH v2 04/10] go: add return status to database close method

Date: Wed, 16 Apr 2014 22:59:19 +1000

To: notmuch@notmuchmail.org

Cc:

From: Peter Wang


Add return status to the Database.Close() method that calls
notmuch_database_destroy.
---
 bindings/go/src/notmuch/notmuch.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go
index 00bd53a..b9230ad 100644
--- a/bindings/go/src/notmuch/notmuch.go
+++ b/bindings/go/src/notmuch/notmuch.go
@@ -144,8 +144,8 @@ func OpenDatabase(path string, mode DatabaseMode) (*Database, Status) {
 
 /* Close the given notmuch database, freeing all associated
  * resources. See notmuch_database_open. */
-func (self *Database) Close() {
-	C.notmuch_database_destroy(self.db)
+func (self *Database) Close() Status {
+	return Status(C.notmuch_database_destroy(self.db))
 }
 
 /* Return the database path of the given database.
-- 
1.8.4


Thread: