[PATCH 4/5] fixed more wrongly initialized constants

Subject: [PATCH 4/5] fixed more wrongly initialized constants

Date: Sun, 31 May 2015 14:02:14 +0200

To: notmuch@notmuchmail.org

Cc: laochailan

From: laochailan


In Go, '= 0' at the beginning means everything is set to zero.
---
 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 741fabf..d664287 100644
--- a/bindings/go/src/notmuch/notmuch.go
+++ b/bindings/go/src/notmuch/notmuch.go
@@ -378,7 +378,7 @@ func (self *Database) CreateQuery(query string) *Query {
 type Sort C.notmuch_sort_t
 
 const (
-	SORT_OLDEST_FIRST Sort = 0
+	SORT_OLDEST_FIRST Sort = iota
 	SORT_NEWEST_FIRST
 	SORT_MESSAGE_ID
 	SORT_UNSORTED
@@ -985,7 +985,7 @@ func (self *Message) GetFileName() string {
 type Flag C.notmuch_message_flag_t
 
 const (
-	MESSAGE_FLAG_MATCH Flag = 0
+	MESSAGE_FLAG_MATCH Flag = iota
 )
 
 // Get a value of a flag for the email corresponding to 'message'.
-- 
2.4.2


Thread: